my code is fat! can anyone show me how it could be optimised?
basically it checks to see if data already exists and acts accordingly. it seems to work but seems a bit cumbersome.
tia for any useful suggestions
//the code
$IP = getenv('REMOTE_ADDR');
$queryip = "select ipadd from customers where ipadd = '$IP'";
$Result = mysql_db_query ($DBName, $queryip,$Link);
$row = mysql_fetch_array($Result);
$now = ($row["ipadd"]);
$queryname = "select name from customers where name ='$array[name]'";
$Resultname = mysql_db_query ($DBName, $queryname,$Link);
$rowname = mysql_fetch_array($Resultname);
$name = ($rowname["name"]);
$queryweb = "select webadd from hoteldetail where webadd ='$array[webadd]'";
$Resultweb = mysql_db_query ($DBName, $queryweb,$Link);
$rowweb = mysql_fetch_array($Resultweb);
$webaddy = ($rowweb["webadd"]);
if ($now || $name || $webaddy){
echo "<br><br><center><h3>$rowname[name] It would appear that your hotel is already in our database if you feel that this is incorrect or wish to add more hotels please telephone xxxxxxxxxx or send an email to <a href=\"mailto:xxxxxxxxxx?subject=multiple listings\">xxxxxxxxxxxxx</a></h3></center>";
}