Mysql Resource ID
Posted: Sun Apr 04, 2004 7:39 pm
I am trying to make a script so you can edit different entries in mysql by the id number. Whenever I use this code, i get a Resource id #2. I have searched this forum, and the posts i read make no sense. I am a N00b at php, so any help would be good.
Code: Select all
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<?PHP
$id = ($HTTP_GET_VARS[id]);
$db = mysql_connect("localhost", "root");
mysql_select_db("events" , $db)
or die("Couldn't open $db: ".mysql_error());
$query = 'SELECT * FROM events WHERE id="$id"';
$result=mysql_query($query);
echo $result;
?>
</body>
</html>