?pathtotake?
New member
$val = $POST["name"];
switch ($_POST['mydropdown']){
case 'a':
if (( $val >=70) and ($val <=100)) {
echo "13 - 15 First Class Honours";
}
if (( $val >=60)and($val <= 69)) {
echo "10 - 12 Upper Second Class Honours";
}
//echo $_POST["name"];
if (( $val >=50)and($val <= 59)) {
echo "7 - 9 Lower Second Class Honours";
}
if (( $val >=40)and($val <= 49)) {
echo "4 - 6 Third Class Honours";
}
if (( $val >=0)and($val <= 39)) {
echo "0 - 3 Fail";
}
The if statements don't seem to be working, Or is is that its not actually getting the value from the text field? Regardless of what I enter in the text field, the output is always:
"0 - 3 Fail"
and ive tried else if
Also to the guy that answered, I havnt put all the code in here, I have 4 switch statements, Im only showing the first.
j... the php youve given me doesn't work, only outputs first class honors for all cases.
switch ($_POST['mydropdown']){
case 'a':
if (( $val >=70) and ($val <=100)) {
echo "13 - 15 First Class Honours";
}
if (( $val >=60)and($val <= 69)) {
echo "10 - 12 Upper Second Class Honours";
}
//echo $_POST["name"];
if (( $val >=50)and($val <= 59)) {
echo "7 - 9 Lower Second Class Honours";
}
if (( $val >=40)and($val <= 49)) {
echo "4 - 6 Third Class Honours";
}
if (( $val >=0)and($val <= 39)) {
echo "0 - 3 Fail";
}
The if statements don't seem to be working, Or is is that its not actually getting the value from the text field? Regardless of what I enter in the text field, the output is always:
"0 - 3 Fail"
and ive tried else if
Also to the guy that answered, I havnt put all the code in here, I have 4 switch statements, Im only showing the first.
j... the php youve given me doesn't work, only outputs first class honors for all cases.