Whats wrong with this statement.
From: Philip J. Newman (NewmanPj_at_PhilipNZ.com)
Date: 12/14/03
- Next message: Philip J. Newman: "Trying to check for a valid URL String."
- Previous message: Philip J. Newman: "What would the best way to veladate a URL string?"
- Next in thread: Justin Patrin: "Re: Whats wrong with this statement."
- Reply: Justin Patrin: "Re: Whats wrong with this statement."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
To: <php-general@lists.php.net> Date: Sun, 14 Dec 2003 12:13:41 +1300
<?php
## ASSUME DATABASE IS CONNECTED AND THESE 2 ITEMS ARE NOT IN THE DATABASE
## THIS RETURNS 1,0 all the time.
$websiteUrl="http://www.philipnz.com/";
$websiteEmail="newmanpj@philipnz.com";
// CHECK TO SEE IF DATA MATCHS WHATS IN THE DATABASE.
$sql = "SELECT hUrl,hContactEmail FROM hyperlinks_data";
$sql_result = mysql_query($sql, $connection) or die ("Could not get Query");
$exists_hUrl = "0";
$exists_hContactEmail = "0";
while ($row = mysql_fetch_array($sql_result)) {
if ($websiteUrl==$row["hUrl"]) { $exists_hUrl = "1"; break; }
if ($websiteEmail==$row["hContactEmail"]) { $exists_hContactEmail = "1"; break; }
}
Echo" $exists_hUrl, $exists_hContactEmail";
?>
--- Philip J. Newman Master Developer PhilipNZ.com [NZ] Ltd. info@PhilipNZ.com
- Next message: Philip J. Newman: "Trying to check for a valid URL String."
- Previous message: Philip J. Newman: "What would the best way to veladate a URL string?"
- Next in thread: Justin Patrin: "Re: Whats wrong with this statement."
- Reply: Justin Patrin: "Re: Whats wrong with this statement."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|