was just writing one of my first apps ever. am checking user input and using is_int() but it is returning false when i enter a number,…crimeny!
below is a distilled excerpt, ….pretty simple. can someone tell me why this returns false?! and btw, is there a convert to integer function, or maybe i can use settype()
<?php
$thisPage = $_SERVER[‘PHP_SELF’];
$theNum = $
if(isset($_POST[‘submit’])) {
if(is_int($theNum)) {
echo $theNum . ” is a number”;
} else { echo $theNum .” is not a number”;}
}
?>
<form action=”<?php $thisPage ?>” method=”post”>
<input type=”text” name=”thenum” />
<input type=”submit” value=”submit” name=”submit”>
</form>
big thanks for any help,