Here's what I currently have. I have a a form that asks for a users phone number and posts it to a new page (the one below). Once it is submitted, it takes the number and if it finds it in the database, simply does the following:
<?php
$db = mysql_connect('localhost', '', '') or die (mysql_error());
mysql_select_db('fmtc', $db);
$query = mysql_query("select * from customers where phone='$phone'") or die (mysql_error());
while($row = mysql_fetch_array($query)) {
echo "$row[phone] <br>";
}
?>
What would I need to add/replace so if the number is not found it takes the user to a page where they would be required to add additional information? I'm guessing I'll have to do an if/else statement to take them to the alternate page but I'm not sure how to begin.
I'm using PHP 4.3.7 and mysql 4.0
jalapena