Jump to content

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??????????

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.