Jump to content

Help with blank text string


unknown1

Recommended Posts

I am trying to create a script where if a condition it true var text string has a value if not it doesn't

 


/// Default vaules

$notFound ="";
$sitname = '';	
$status = '';
$pageviews = '';
$verstatus = '';
$upgradesite = '';
$editsite = '';

$sql =mysql_query(select * from table);
$numrows = mysql_num_rows($sql);
if($numrows > 0){

$sitname = "Site Name";	
$status = "Status";
$pageviews = "Views";
$verstatus = "Verification";
$upgradesite = "Upgrade";
$editsite = "Edit";
}

 

The issue is it always shows up blank even when $numrows > 0

can anyone spot the issue??

 

 

 

Link to comment
https://forums.phpfreaks.com/topic/173574-help-with-blank-text-string/
Share on other sites

oh that was just an example =)

not the code I'm trying to use.

 

on this example I started with a blank value and it should be the other way around...

Point is a have another variable that works the opposite and starts with blank and if condition is true has a value and it works fine... but when I try to do the reverse start with variable having a value and if condition is true value is blank it won't work.

 

it's the same thing just reverse... also runs in the same condition

as the other, this is crazy. Any ideas??????????

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.