View Single Post
Old 11-18-2012, 12:18 AM   PM User | #1
johnnycabbage
New Coder

 
Join Date: Nov 2011
Posts: 41
Thanks: 2
Thanked 0 Times in 0 Posts
johnnycabbage is an unknown quantity at this point
Using PHP variable

How could this be done? It won't allow me to use the $id variable in the mysql_query() function:
PHP Code:
if (isset($_GET["id"]))
   {
   
$id explode(":",$_GET["id"]);
}

$result mysql_query("SELECT * FROM Articles WHERE `ID` = $id"); 

Last edited by johnnycabbage; 11-18-2012 at 12:38 AM.. Reason: forgot a word
johnnycabbage is offline   Reply With Quote