Hello all.
I am a PHP newbie and am having an issue using the && in an if
statement. here is the code:
if ($_REQUEST["frmIsEarlyBird "] == "1" && date("Y-m-d") <
$rowWork["wEarlyBird "]) {
die("<h1>The earlybird special has ended.</h1>");
}
Ok when the code runs it and both conditions are true nothing happens.
Testing:
$_REQUEST["frmIsEarlyBird "] is a valid form request and returns a
string of 1 or 0 depending on what im sending.
$rowWork["wEarlyBird "] Has a valid date in it and should validate as
true
If i put these if statements on the page they both work fine.
if ($_REQUEST["frmIsEarlyBird "] == "1") {
echo "<br><br>TRUE<b r><br>";
} else {
echo "<br><br>False< br><br>";
}
if (date("Y-m-d") < $rowWork["wEarlyBird "]) {
echo "<br><br>TRUE<b r><br>";
} else {
echo "<br><br>False< br><br>";
}
Thanks in advance for any help
I am a PHP newbie and am having an issue using the && in an if
statement. here is the code:
if ($_REQUEST["frmIsEarlyBird "] == "1" && date("Y-m-d") <
$rowWork["wEarlyBird "]) {
die("<h1>The earlybird special has ended.</h1>");
}
Ok when the code runs it and both conditions are true nothing happens.
Testing:
$_REQUEST["frmIsEarlyBird "] is a valid form request and returns a
string of 1 or 0 depending on what im sending.
$rowWork["wEarlyBird "] Has a valid date in it and should validate as
true
If i put these if statements on the page they both work fine.
if ($_REQUEST["frmIsEarlyBird "] == "1") {
echo "<br><br>TRUE<b r><br>";
} else {
echo "<br><br>False< br><br>";
}
if (date("Y-m-d") < $rowWork["wEarlyBird "]) {
echo "<br><br>TRUE<b r><br>";
} else {
echo "<br><br>False< br><br>";
}
Thanks in advance for any help
Comment