I have 7 if statements that do something depending on what $_POST['command'] is, it works for the first 6th and on the last one it adds a 1 (only ads the 1 at the end IF its the one in the if statement).
Example of the failing line:
CODE
if ($_POST['final'] == 'yes' AND $_POST['command'] == 'lol' AND $_POST['action'] == 'cmd')
{
{
The other ifs are like that, just $_POST['command'] == other things.
Those if statements work. It does this with $_GET and $_REQUEST. It does this no matter what I put in the statement and if i make it blank it puts a 1 anyways.
I even put this before the if statement:
CODE
$whattostrp2 = array("1");
$_POST['command']= str_replace($whattostrp2, "", "$_POST[command]");
$_POST['command']= str_replace($whattostrp2, "", "$_POST[command]");
STILL adds a 1. I have it echoing the $_POST['command'], hence how I know this. What I don't understand its WHY it does this ONLY on the 7th if statement and not the others. I tried to make it where $_POST['command'] == 'lol1' and it adds ANOTHER 1.
It also does this with else if and elseif. If I redo the IF statement like this:
CODE
if ($_POST['command'] == 'lol')
{
{
It still fails.
Any ideas? This is really bugging me and I have found NOTHING on it.


