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