D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
home
/
realadss
/
kavyaeventz.in
/
admin
/
ajax
/
Filename :
home-ajax.php
back
Copy
<?php include"../connection.php"; $id = $_POST['id']; $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); $altb = $_POST['altb']; // $bannerimage = $_FILES['banner']; // $temper = $bannerimage['tmp_name']; // $date = date('y-m-d-H-i-s'); // $filebanner = $date."banner.png"; $bannerimage = $_FILES['banner']; $bannerimageold = $_POST['bannerold']; $temper = $bannerimage['tmp_name']; $editordata1 = $_POST['editordata1']; $replaceArray1 = array( '"' => """, "'" => "'", ); $modifiedText1 = str_replace(array_keys($replaceArray1), array_values($replaceArray1), $editordata1); // $sql = "INSERT INTO `home`(`meta1`, `meta2`, `meta3`, `meta4`, `script`, `pixcel`, `banner`, `altb`, `description`) VALUES // ('$meta1', '$meta2', '$meta3', '$meta4', '$script', '$pixcel', '$filebanner', '$altb', '$modifiedText1')"; $sql = "UPDATE `home` SET `meta1`='$meta1',`meta2`='$meta2',`meta3`='$meta3',`meta4`='$meta4',`script`='$script',`pixcel`='$escaped_html_line', `banner`='$bannerimageold',`altb`='$altb',`description`='$modifiedText1' WHERE id = '1'"; $query = mysqli_query($conn, $sql); if($query){ move_uploaded_file($temper, '../images/new/'.$bannerimageold); echo 1; }else{ echo 2; } ?>