Delete confirm_password.php

parent 99f48866
<?php
include('session.php');
$cid=$_POST['chatid'];
$pass=$_POST['chat_pass'];
$query=mysqli_query($conn,"select * from chatroom where chatroomid='$cid'");
$row=mysqli_fetch_array($query);
if ($row['chat_password']==$pass){
mysqli_query($conn,"insert into chat_member (chatroomid, userid) values ('$cid', '".$_SESSION['id']."')");
header('location: chatroom.php?id='.$cid);
}
else{
?>
<script>
window.alert('Incorrect Password!');
window.history.back();
</script>
<?php
}
?>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment