フォームの変数を確認したい。ここでは、"a" と "b" を 5 から 99 までの数字にしたいと考えています。それが true の場合、このページに留まらない場合は、次のページに自動的にリダイレクトします。
私が作成したコードを示して説明させてください: (申し訳ありませんが、ここでコードを記述する方法を理解するのに 15 分を費やしましたが、理解できないので、必要に応じてスペースを使用します)
<input type="text" name="a"><br>
<input type="text" name="b"><br>
<input type="submit" value="GO!">
<?php
if (is_numeric($_POST["a"]) && is_numeric($_POST["b"]) &&
$_POST["a"]<100 && $_POST["a"]>4 && $_POST["b"]<100 && $_POST["b"]>4) {
echo "corect";
//here i want to go to the next page like registration_complete.php
}
else {
//here i want to remain to this page and show the errors to the user
}
?>
このおそらく単純な質問で申し訳ありませんが、Googleでばかげた答えしか見つかりません。