D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
home
/
realadss
/
kavyaeventz.in
/
admin
/
ajax
/
Filename :
testimonial-update.php
back
Copy
<?php include"../connection.php"; $id = $_POST['id']; $bannerimage = $_FILES['banner']; $profile = $_POST['profile']; $alt = $_POST['alt']; $bannerimageold = $_POST['bannerold']; $temper = $bannerimage['tmp_name']; move_uploaded_file($temper, '../images/new/'.$bannerimageold); $pname = $_POST['pname']; $replaceArray0 = array( '"' => """, "'" => "'", ); $modifiedText0 = str_replace(array_keys($replaceArray0), array_values($replaceArray0), $pname); $editordata1 = $_POST['editordata1']; $replaceArray1 = array( '"' => """, "'" => "'", ); $modifiedText1 = str_replace(array_keys($replaceArray1), array_values($replaceArray1), $editordata1); $sql = "UPDATE `testimonials` SET `name`='$modifiedText0',`profile`='$profile',`photo`='$bannerimageold',`altp`='$alt',`des`='$modifiedText1' WHERE id = '$id'"; // echo $sql; // die(); $query = mysqli_query($conn, $sql); if($query){ echo 1; }else{ echo 2; } ?>