PDA

View Full Version : if Query = yes problem


sitami
01-30-2004, 01:25 AM
ok guys im having a problem....

really need this one solved fairly quickly too :(


$checkprem = $_SESSION['MM_Username'];
mysql_select_db($database_database, $database);
$query = "SELECT * FROM members WHERE username='$checkprem'";
$checkpremquery = mysql_query($query, $database);
$result = mysql_fetch_array($checkpremquery);
if (!($result)) {
$upgrademsg = "For access to all our games & more <br/>Click <a href=\"upgrade.php\" class=\"matessmalltxt\" color=\"000000\">Here</a> to upgrade your<br /> account for only £15.00pa !";
echo $upgrademsg;
} else {
$upgrademsg = "";
$lnk1 = "<a href=\"http://matesonline.fonetasticmobile.co.uk/mobile/websms/\" target=\"_blank\" class=\"matesprofiletxt\" style=\"color: #FF6600\">Send SMS</a><br/>";
$link 2 = etc .. then further

then further down i have the $link* being echoed

what i then want is if the result = Yes then i want it to display hyperlinks

if no i want it to say Upgrade accout

sounds simple doesnt it .. well i cant figure it out :(

if anyone could help me id appreciate it

thanks

EDIT :: forgot to mention

in the database it is
premium set 'Yes','No' so it will either be yes or no.

dont knwo if it helps but thought id add it

thanks

sitami
01-30-2004, 03:57 AM
problem solved lol

was trying to call $checkpremquery['premium'] instead of $result['premium']


DOH!