Jump to content

Recommended Posts

Here's the code.  The script in and of itself works fine.  It's this section here. Once again, everything else works fine.  When I echo $num and $limit, I get 4 and 3 just like I am supposed to.

$limit = $_POST['limit'];
$value = $_POST['value'];
IF ($value != ""){
$cl = mysql_query("SELECT * FROM `data` WHERE `$value` = 'yes'")or die(mysql_error());
$num = mysql_num_rows($cl);

}
IF ($num > $limit){
     Echo 'It is workin';
}

Try this just to make sure...

 

$limit = $_POST['limit'];
$value = $_POST['value'];
IF ($value != ""){
$cl = mysql_query("SELECT * FROM `data` WHERE `$value` = 'yes'")or die(mysql_error());
$num = mysql_num_rows($cl);

}

$num = 4;
$limit = 3;

IF ($num > $limit){
     Echo 'It is workin';
}

you never did really tell us the problem.....

 

you pretty much just said....IF statement don't work (*in a hillbilly accent* to make a point)

 

what doesn't work about it...are you getting errors...are the values empty, is the page blank, is the ECHO not echoing....

I'd assume the echo is working but...well....Maq as pretty much solved that idea

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.