I am not sure where to place the error message text that I want to display (Please enter a valid ID).
Here is the snippet...
if ($sth->fetchColumn() <= 0) { // Invalid ID exit; }
instead of exit replace with
echo "Please enter a valid ID";
Thank you - that worked. How would I get this to redirect to a webpage instead of displaying the error message?
You use the header function
header("location:../target_page.php");
thanks! worked perfectly!