one important thing:
if you send variables with an URL, you get its values in $_GET arrray
YOu've better done a delete function with a POST method, its safer,
just think of it, i can "click" with a machine on your delete ID's link.
you navigated the user to a form asking yes or no, but you should insert the $POST['mGinNo'] value into a hidden field into the form to store the ID for destroying 🙂 As i explained $POST["mGinNo"] is $_GET["mGinNo"] in your code.
try to use different variable names.
best you can do while you're troubleshooting is to switch ON the error reporting,
will telli you undefined variables in line XX and line XX
error_reporting(E_ALL);
ini_set("display_errors", 1);
however your program then working, but do not trust the user inputs.
how to prevent your database from harmful SQL injections?
if you handle INTEGER types, you can use a cast method:
if(!isset($_POST['mGinNo']))
die("ID is missing!");
else
{
$mGinNo = (int)$_POST['mGinNo']; //this (int) will converts your data into integer
}
In other cases mysql_real_escape_string() function should be used.
hello, jjozsi.