Hi,im trying to make advanced registration system, with ‘‘Home town’’ not required,so at profile page ‘‘Home town: blabla’’ will show only if field in database is set.I have field in users called home_town and its empty,but it still shows ''Home town: ‘’ how do i check if field is empty or not?
Tried something like this:
[php]$home_town_query = mysql_query(“SELECT home_town
FROM users
WHERE user_id
=’$my_id’”);
if(mysql_num_rows($home_town_query) <> 0) {
echo 'Home town: '.$profile_data[‘home_town’];
}[/php]
It gets all variables,and everything is working perfectly,i think i must change that mysql_num_rows but to what? Thx for advice.