pass same name as query string in URL and form. Which one will used by PHP?
For example,
<form method='post' action='test.php?nameval=abc'>
<input type='text' name='nameval'>
<input type='submit' value='Submit'>
</form>
Regards, Jeyakumar N
您将使用$_GET['numeral']
捕获URL变量,并使用$_POST['numeral']
捕获表单变量(除非您的表单方法是GET
。
for $_REQUEST
it depends on your php.ini
how do variables get passed, read here , usually it's the $_POST
that will pass, for the rest is the same:
$_GET['nameval'] = abc
$_POST['nameval'] = your input form
$_REQUEST['nameval'] = your input 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.