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
Release: 2016-09-11 11:34:06
Original
960 people have browsed it

$_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>
Copy after login
Copy after login

$_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>
Copy after login
Copy after login

$_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

Related labels:
php
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template