D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
home
/
realadss
/
kavyaeventz.in
/
admin
/
ajax
/
Filename :
faqs-update.php
back
Copy
<?php include"../connection.php"; $id = $_POST['id']; $category = $_POST["category"]; $sub_category = $_POST["sub_category"]; $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 `faqs` SET `category`='$category', `sub_category`='$sub_category', `question`='$modifiedText0',`answer`='$modifiedText1' WHERE id = '$id'"; $query = mysqli_query($conn, $sql); if($query){ echo 1; }else{ echo 2; } ?>