ole90
09-18-2007, 05:46 PM
//Lets check that train contains only: health, strength, defence, accuracy
if($traintype != "health") {} elseif ($traintype != "strength") {} elseif ($traintype != "defence") {} elseif ($traintype != "accuracy") {} else {
$input = "Wrong Training Type.";
error($input);
}
$traintype is a _Get variable gotten from the url so the user can edit it.
The code above doesn't seem to work because it still allows me to enter anything the in the url and doesn't stop the script.
Any ideas ;X?
if($traintype != "health") {} elseif ($traintype != "strength") {} elseif ($traintype != "defence") {} elseif ($traintype != "accuracy") {} else {
$input = "Wrong Training Type.";
error($input);
}
$traintype is a _Get variable gotten from the url so the user can edit it.
The code above doesn't seem to work because it still allows me to enter anything the in the url and doesn't stop the script.
Any ideas ;X?