hello this is my first Post so lets see how this goes i have a real problem
im just starting a new job and im taking over someone elses ugly @$$ code and Database and im trying to fix some links and Schtuff but...here is the problem...
ok...I have a mySQL db and it has a Field called Quicktime and it is empty on like 50 users and 2 users have a href in there....
i have one dynamic page that references and pulls the rest of the info like BIO and PICS but i have one button to link this href and at the moment it pulls up a Unavailable page
now im trying to change that so..
if field = href then go to href
else if
Field = null then
go to unavailable.php
i am thinking in a ASP mindset so i am confusing myself
any help on how to set up the If statement and Conditions...??
thanx
Some help with a If statement querying a DB
Moderator: General Moderators
//first connect, and retrieve the info from the db and assign the quicktime field value to a variable
if ($quicktime){
print ("<button type="\button\" onClick=\"javascript:location='".$quicktime."';\">");
}else{
print ("<button type=\"button\" onClick=\"javascript:location='/yourpath/unavailable.php'\"");
}
Hope this help
if ($quicktime){
print ("<button type="\button\" onClick=\"javascript:location='".$quicktime."';\">");
}else{
print ("<button type=\"button\" onClick=\"javascript:location='/yourpath/unavailable.php'\"");
}
Hope this help