D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
home
/
realadss
/
kavyaeventz.in
/
admin
/
ajax
/
Filename :
testimonial-ajax.php
back
Copy
<?php include"../connection.php"; $bannerimage = $_FILES['banner']; $profile = $_POST['profile']; $alt = $_POST['alt']; $temper = $bannerimage['tmp_name']; $date = date('y-m-d-H-i-s'); $filebanner = $date."userp.png"; $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); // print_r($modifiedText1); // die(); move_uploaded_file($temper, '../images/new/'.$filebanner); $sql = "INSERT INTO `testimonials`(`name`, `photo`, `altp`, `profile`, `des`) VALUES ('$modifiedText0','$filebanner','$alt','$profile','$modifiedText1')"; $query = mysqli_query($conn, $sql); if($query){ echo 1; }else{ echo 2; } ?>