unknown1 Posted September 8, 2009 Share Posted September 8, 2009 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?? Quote Link to comment https://forums.phpfreaks.com/topic/173574-help-with-blank-text-string/ Share on other sites More sharing options...
mikesta707 Posted September 8, 2009 Share Posted September 8, 2009 $sql =mysql_query(select * from table); should be $sql =mysql_query("select * from table"); I'm suprised you aren't getting any errors Quote Link to comment https://forums.phpfreaks.com/topic/173574-help-with-blank-text-string/#findComment-914925 Share on other sites More sharing options...
unknown1 Posted September 8, 2009 Author Share Posted September 8, 2009 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?????????? Quote Link to comment https://forums.phpfreaks.com/topic/173574-help-with-blank-text-string/#findComment-914934 Share on other sites More sharing options...
mikesta707 Posted September 8, 2009 Share Posted September 8, 2009 Oh ok, well it will be hard to tell you whats wrong if you don't post the actual code you're working with Quote Link to comment https://forums.phpfreaks.com/topic/173574-help-with-blank-text-string/#findComment-914936 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.