I really don’t get why this isn’t working, so please help. I’m trying to convert a str to an int and do if statements with it, but I can’t for some reason. The code jumps right over the if statement like it’s not even there???
<?php
$cost = $_REQUEST['cost'];
$cost = (int) $cost;
if($cost < 2){
header('Location: page.php?say=numerror');
}
?>
<input name="cost" id="cost" type="text" class="tfield" />
I have a suspicion you need: