> I'm trying to call a script with the "?=" after the php script name in
> URL, but can't seem to pick up the variable to use in my script...
> any help would be greatly appreciated :)
> I'm calling the script with this url:
> The section of the script i'm using is:
> $id = $_GET['id'];
> $sql="SELECT * FROM content where title=$id";
Well, for your example, $id is going to equal "TestPage", so you are
making an invalid query: where title=TestPage. If you echo
mysql_error(), it'll probably say something about unknown column
At the very least, use quotes:
> Error message returned:
> Warning: mysql_fetch_array(): supplied argument is not a valid MySQL
> resource in...
This means your query failed. Echo mysql_error() to determine why. Get
used to using mysql_error for good debugging.
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php