Skip to content

Commit

Permalink
Merge pull request #43 from rexllc/patch-3
Browse files Browse the repository at this point in the history
Added real_escape_string
  • Loading branch information
mahtab2003 authored Dec 7, 2021
2 parents e52e75d + a3bd062 commit c4e3b23
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/admin/function/NewKnowledgebase.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
require_once __DIR__.'/../handler/AreaHandler.php';
if(isset($_POST['submit'])){
$FormData = array(
'subject' => $_POST['subject'],
'content' => $_POST['editor'],
'subject' => $connect->real_escape_string($_POST['subject']),
'content' => $connect->real_escape_string($_POST['editor']),
'date' => date('d-m-Y')
);
$sql = mysqli_query($connect,"INSERT INTO `hosting_knowledgebase`(`knowledgebase_subject`,`knowledgebase_date`,`knowledgebase_content`) VALUES ('".$FormData['subject']."','".$FormData['date']."','".$FormData['content']."')");
Expand All @@ -31,4 +31,4 @@
else{
header('location: ../');
}
?>
?>

0 comments on commit c4e3b23

Please sign in to comment.