D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
home
/
realadss
/
kavyaeventz.in
/
admin
/
ajax
/
Filename :
Service-insert.php
back
Copy
<?php include"../connection.php"; $bannerimage = $_FILES['banner']; $meta1 = $_POST['meta1']; $meta2 = $_POST['meta2']; $meta3 = $_POST['meta3']; $meta4 = $_POST['meta4']; $script = $_POST['script']; $pixcel = $_POST['pixcel']; $escaped_html_line = $conn->real_escape_string($pixcel); $alt = $_POST['alt']; $temper = $bannerimage['tmp_name']; $date = date('y-m-d-H-i-s'); $filebanner = $date."banners.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 `service_cat`(`name`, `meta1`, `meta2`, `meta3`, `meta4`, `script`, `pixcel`, `banner`, `alt`, `des`) VALUES ('$modifiedText0','$meta1','$meta2','$meta3','$meta4','$script','$pixcel', '$filebanner', '$alt', '$modifiedText1')"; $query = mysqli_query($conn, $sql); if($query){ echo 1; }else{ echo 2; } ?>