Ok, this is going to be rather hard to explain. What i have is i have a link to readme.php?id=7 which pulls the row which its id = 7.
Well my sql statement line... which is $result = mysql_query("SELECT * FROM articles WHERE id=$id",$con);
Will break unless $id = a number. It wont take it from my url ?id=7 i have to set it in the actuall sql script. Now does anybody have any suggestions to make this id pass through the url so on readme.php the id is read as =ing 7 or whatever the id is, so that it will display the row which's id ='s 7 rather than giving me this error..
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /functions.inc on line 167
You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
and my entire sql statement is as follows....
$db = mysql_select_db("pinehead", $con) or die(mysql_error());
$result = mysql_query("SELECT * FROM articles WHERE id=$id",$con);
$row = mysql_fetch_array($result);
$art = $row['article'];
$date = $row['date'];
$author = $row['author'];
$subject = $row['subject'];
$it = $row['id'];
echo "<img src=/images/right_arrow.gif> <span class=hilight>";
echo $subject;
echo "<br>";
echo "<div class=small><img src=/images/1x1.gif width=12 height=1> ";
echo "<a class=small href=>";
echo $author;
echo "<a> | Fri, Mar 21st 2003 21:53:41 CST<br>";
echo "</p>";
Thank you for your help.
PiNeHeAd