Jump to content

Get ID error catching


markspec87

Recommended Posts

ive got a page where i use this code to display data from my database.

[code]$query="SELECT * FROM results WHERE autonumber = $_GET[id]";[/code]

When they goto the index page and click a result it would goto "results.php?id=1/2/3/"

And display the appropiate data.

My question is, how can i get the page to display "No data specified" or something similar when someone just types results.php with no ID. At the moment it will just show the page with the database driven areas blank.

thanks :)
Link to comment
https://forums.phpfreaks.com/topic/16218-get-id-error-catching/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.