View Single Post
Old January 4th, 2007, 1:55 AM   #16 (permalink)
cowboy
Surpass Fan
Excelling Contributor
 
cowboy's Avatar
 
Joined in Nov 2005
Lives in Colorado
Hosted on DEDI
937 posts
Gave thanks: 2
Thanked 95 times
Sorry to mislead you by not including the array extraction statement. This example does work (tested).

PHP Code:
<?
$link 
mysql_connect('localhost''db_username''db_password');
$db_selected mysql_select_db('yourusername_test'$link);
 
$compare $_GET['action'];
 
$sql "select domain from hlsremote where domain='".$compare."'";
 
$result mysql_fetch_array(mysql_query($sql));
 
if (
$result['domain'] == $compare) {
    echo 
"it is there in the database.";
} else {
    echo 
"that domain is not in the database.";
}
?>
__________________
Where would you be if you were at the highest court in the land (US)?
cowboy is offline   Reply With Quote
This user thanks cowboy for this great post!
panache (January 4th, 2007)