Hi, I know this may sound amatureish (I've tried searching for a solution but have not found anything). Well I went to php.net and found the function is_int to check if a variable is an integer. I have a simple form ie with one of the test boxes:
<input type="text" name="v2">
Then on the page where the information is processed (method = "post) I have:
if(!is_int($v2)) {
exit();
}
I thought it would check if it was an integer if not it would exit but it does not work.
I'd be greatful if anyone could help. Thanks
ps this may also help the above example has been simplified and the form is actually made up of text boxes with arrays. This is how the is_int is actually checked so it maybe something todo with this:
foreach($drawGameBoards as $v1) {
foreach($v1['numbersChosen'] as $v2) {
if(!is_int($v2) {
exit();
}
}
}
<input type="text" name="v2">
Then on the page where the information is processed (method = "post) I have:
if(!is_int($v2)) {
exit();
}
I thought it would check if it was an integer if not it would exit but it does not work.
I'd be greatful if anyone could help. Thanks
ps this may also help the above example has been simplified and the form is actually made up of text boxes with arrays. This is how the is_int is actually checked so it maybe something todo with this:
foreach($drawGameBoards as $v1) {
foreach($v1['numbersChosen'] as $v2) {
if(!is_int($v2) {
exit();
}
}
}