hansman Posted August 21, 2008 Share Posted August 21, 2008 Here is my code ...$zip is from $_POST['zip'] if (preg_match("/^\w{1,10}$/", $zip, $matches)) { echo $zip; $query = "SELECT Companies.Name, Companies.Phone, Companies.ZipCodes, Zips.ZipCode FROM Companies, Zips Where Zips.ZipCode='$zip'"; } else{ // we don't bother querying the database echo "Not A Valid Zip Code"; } while($row = mysql_fetch_array($query)){ echo "Zip Code Phone Numbers: " . $row['Companies.Phone']; } Quote Link to comment Share on other sites More sharing options...
revraz Posted August 21, 2008 Share Posted August 21, 2008 You didn't use mysql_query($query) anywhere in your code. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.