I have a table name forum, the table looks like this;
id studentid description teacherid
1 abc123 hi zxc123
2 abc123 hello qwe321
I want to delete a row, what I tried is,
<?php
require_once('Connections/dbcon.php');
mysql_select_db("school", $dbcon);
$student_id=$_GET['student_id'];
$delete=mysql_query("DELETE from forum WHERE student_id='$student_id'")or die(mysql_error());
echo "<script language='Javascript'>alert('The Forum Successfully Deleted!');
location.href='tviewforum.php'</script>";
?>
I want the specific message in a forum. If a student make 2 forums, I want to remove 1 of them and keep the other 1.