![]() |
|
|
|
|
|||||||
| PHP / MySQL Assistance We understand. Not all of you are experienced programmers, but some of you are highly skilled at coding. So we've set aside this forum so you can ask questions, and provide answers to the most commonly asked PHP / MySQL issues. |
![]() |
|
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
I do not understand what I am missing or doing wrong. Can anyone see what I am doing wrong?
The goal is to take a zip code from a previous page and see if it is in the database. If not give an error page else continue on. set_time_limit(0); include "database.php"; if (($REQUEST_METHOD == "POST") && (!strpos($HTTP_REFERER , "main.php"))) { $query = "select * from ZipCodes where ZipCode = '$Zip'"; $zip_query = mysql_query($query , $dbh); $zip_row = mysql_fetch_array($zip_query); //Want to see if zip_row is null or not. (echo "") (if $zip_row) {) ("Location: zipcodeserved.php"); // redirect to zipcode being served page }else part { header("Location: zipcodenotserved.php"); // redirect to zipcode not being served page } ?> |
|
#2
|
||||
|
||||
|
Place this code in the php.ini file:
Code:
display_errors = On At first glance it seems to me that the line: PHP Code:
And do not forget PHP Code:
|
|
#3
|
|||
|
|||
|
that would do it.
![]()
|
![]() |
| Tags |
| working |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|