Home >Backend Development >PHP Tutorial >$_SERVER['PHP_SELF'] cannot POST the information of this page?

$_SERVER['PHP_SELF'] cannot POST the information of this page?

WBOY
WBOYOriginal
2016-09-11 11:34:06966browse

$_SERVER['PHP_SELF'] cannot POST the information on this page?

Please enter the ID number, if not, enter the ID number you want

<code><form method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>">
<input type="text" id="id" name="id" /><br />
<input type="submit" value="submit" name="submit"/></code>

$_POST['id']=$id;
echo $id;
?>
Can't I echo the text I just entered directly on this page? ?

Reply content:

$_SERVER['PHP_SELF'] cannot POST the information on this page?

Please enter the ID number, if not, enter the ID number you want

<code><form method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>">
<input type="text" id="id" name="id" /><br />
<input type="submit" value="submit" name="submit"/></code>

$_POST['id']=$id;
echo $id;
?>
Can't I echo the text I just entered directly on this page? ?

$_post is on the right, and the assignments are all wrong

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn