In a form on a PHP page, you can use:
<form action="<?php echo $_SERVER['PHP_SELF']; ?>" ...>
or
<form action="#" ...>
or
<form action="" ...>
in the action attribute of the form. Since echo $_SERVER['PHP_SELF']
does not pass variables for using GET
and you have to use ""
, why would you use that or "#"
?
I'm asking because it took me some time to figure out that the variables are not passed with $_SERVER['PHP_SELF']
. Thanks.
Question&Answers:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…