I was learning to validate form data. When I had to write this:
"<"form method="post" action=""<"php echo htmlspecialchars($_SERVER["PHP_SELF"]);?>"
but when I write this, in output, there is a ">
showing at the top of the page. Why?
Assuming, there is an echo
or a print
.Change this:
echo "form method="post" action=""<"php echo htmlspecialchars($_SERVER["PHP_SELF"]);?>"
to this:
echo '<form method="post" action="' . $_SERVER['PHP_SELF'] . '">';
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.