$sql = "SELECT cat_id, cat_name, cat_description FROM duk_categories WHERE cat_id = '" . mysql_real_escape_string($_GET['cat_id']) . "'";
if(mysql_num_rows($result) == 0) { echo 'This category does not exist.'; }
/category.php?cat_id=2
if (isset($_GET['cat_id'])){ // sql code here }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)