I don’t know why but the data type in this code makes a trouble when the id in the url starts with the number zero like this:
http://localhost/exp/update.php?id=03A43
In this case the id is 03A43.
And my query looks like this:
mysql_select_db("school", $con);
$result = mysql_query("SELECT * FROM student WHERE IDNO=".(int)$_GET['id']);
?>
There is no problem in the design if the id does not start with the number zero.
What might be the proper data type for numbers beginning in zero?
Quote your string: