main.php files has:
$randnum=rand(100,500);
echo '
<form name="form1" id="form1" action="my.php" method="post">
<input type="text" name="A'.$randnum.'" id="A'.$randnum.'" value="catch me!">
<input name="Submit" type="submit" value="Send">
</form>
';
browser displays:
<form name="form1" id="form1" action="my.php" method="post">
<input type="text" name="A382" id="A382" value="catch me!">
<input name="Submit" type="submit" value="Send">
</form>
How to catch “catch me!” from the form ($_POST[‘A382’] value)? (382 is not defined before the page was loaded). Any way to get an array of all variables that are send by POST method? Any better way?
Thank you.
1 Answer