php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #39049 IF statment problem
Submitted: 2006-10-05 14:22 UTC Modified: 2006-10-05 14:29 UTC
From: bojan dot saksida at volja dot net Assigned:
Status: Not a bug Package: *General Issues
PHP Version: 5.2.0RC4 OS: Windows XP
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: bojan dot saksida at volja dot net
New email:
PHP Version: OS:

 

 [2006-10-05 14:22 UTC] bojan dot saksida at volja dot net
Description:
------------
I have a problem in if statment, where i if with more than one statment. i would prefer this method instead nested if statments. I also tried instead "or" i used "||" syntax.

Reproduce code:
---------------
$form['option_form']['method'] = "post";

if ($form['option_form']['method'] != "post" or $form['option_form']['method'] != "get" or $form['option_form']['method'] != "submit")
{
    die ("In this case it will run this part of IF statment, but it shoudn't");
}
else
{
    die("This part it shoudnt do it.");
}


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-10-05 14:27 UTC] bojan dot saksida at volja dot net
Sory abaut that, but second die shoud be called, but it doesn't
 [2006-10-05 14:29 UTC] tony2001@php.net
Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions.  Due to the volume
of reports we can not explain in detail here why your report is not
a bug.  The support channels will be able to provide an explanation
for you.

Thank you for your interest in PHP.


 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Wed Oct 07 06:00:01 2026 UTC