Hello:
I'm trying to write an "if" statement which tests two variables using an OR.
The should be:
if fico or ficonum is less than 680 - go to index.html page
else if
fico or ficonum is greater or equal to 680 - to to details_costs.php page.
When I run the script and test for both conditions I am brought to the index.html page. When I type in a number of 720 (which is greater than 680) I'm brought to index.html not details_costs.php. I am not sure why this is happening.
The reason for fico and ficonum are the following. Some people may not know their score so "fico" assigns a value to "Excellent" being 730, "Good" being 700, etc. Others may know their score so "ficonum" is the actual score the person types. A person uses one of the two not both.
To check logical conditions I thought one usess || for OR, < for less than, and >= for greater or equal. Can someone help me out?
Thank you in advance.
This is my statement:
if (($_SESSION['fico'] || $_SESSION['ficonum'] < 680)) {
include('index.html');
} elseif
(($_SESSION['fico'] || $_SESSION['ficonum'] >= 680)) {
include('details_costs.php');
}