thar Posted February 19, 2010 Share Posted February 19, 2010 For starters I will tell that php is very new for me. I've tried to create a script that tells about the numbers or more than it will be posted through an input field. But it will not work and I can not even see the error. Hope someone can help... <form method="POST" action="<?php $_SERVER['PHP_SELF'] ?>"> <input type="text" name="felt" value="" /> <input type="Submit" name="Submit" value="TEST" /> </form> <?php $kode1 = $_POST['felt']; if(isset($_POST['felt'])) { echo $kode1; echo " : "; if(is_int($kode1)) { echo "here is only written numbers!"; } else { echo "here is written both letters and numbers!"; } } ?> Link to comment https://forums.phpfreaks.com/topic/192678-help-to-debug/ Share on other sites More sharing options...
mapleleaf Posted February 19, 2010 Share Posted February 19, 2010 I think you are looking for is_numeric() instead of is_int() Link to comment https://forums.phpfreaks.com/topic/192678-help-to-debug/#findComment-1015029 Share on other sites More sharing options...
thar Posted February 19, 2010 Author Share Posted February 19, 2010 Hello mapleleaf thx, you was right. it works now. ) have a nice weekend.. //thar Link to comment https://forums.phpfreaks.com/topic/192678-help-to-debug/#findComment-1015036 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.