here is the code:
echo '<form id="register" action="index.php" method="post">
<textarea form="register" name="mloc"></textarea>
<input type="submit" value="continue" name="submit>"
</form>';
on index.php:
$a=$_POST['mloc'];
this returns:
NOTICE: undefined index
mloc
on line 1
You don't need form="register"
when textarea is inside the form. So:
echo '<form id="register" action="index.php" method="post">
<textarea name="mloc"></textarea>
<input type="submit" value="continue" name="submit>"
</form>';
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.