diff --git a/confirm.php b/confirm.php index 5d1e3bc..c973677 100644 --- a/confirm.php +++ b/confirm.php @@ -57,7 +57,7 @@ 0) diff --git a/index.php b/index.php index 67eb5b0..a1293a3 100644 --- a/index.php +++ b/index.php @@ -60,7 +60,7 @@ if(isset($_POST['signin'])) { - $email = $_POST['email']; + $email = mysqli_real_escape_string($conn, $_POST['email']); $password = base64_encode($_POST['password']); // "SELECT * FROM `people` WHERE name='$name'" $sql = "SELECT * FROM `users` WHERE `email`='$email' and `password`='$password'"; diff --git a/msgchecker.php b/msgchecker.php index c4da17c..d04072d 100644 --- a/msgchecker.php +++ b/msgchecker.php @@ -2,7 +2,7 @@ session_start(); include 'connection.php'; - $name = $_POST['name']; + $name = mysqli_real_escape_string($conn, $_POST['name']); // $sql = "SELECT convs, stored_at, ip FROM conv WHERE name = '$name';"; $sql = "SELECT `convs`, `ip`, `stored_at` FROM `conv` WHERE chatroom = '$name' ORDER BY `id` DESC"; // print_r($sql); @@ -19,7 +19,7 @@ while ($row = mysqli_fetch_assoc($result)) { if($row['ip'] == $remote_ip) { - $sql1 = "SELECT `convs`, `ip`, `stored_at` FROM `conv` WHERE chatroom = '$name' AND ip = $remote_ip ORDER BY `id` DESC"; + $sql1 = "SELECT `convs`, `ip`, `stored_at` FROM `conv` WHERE chatroom = '$name' AND ip = $remote_ip ORDER BY `id` DESC"; $res = $res.'
'; $res = $res.'You'; $res = $res."

".$row['convs']; diff --git a/msgpost.php b/msgpost.php index 7ee0886..56533b8 100644 --- a/msgpost.php +++ b/msgpost.php @@ -1,8 +1,8 @@