googleankan
-
Posts
3 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Posts posted by googleankan
-
-
Hi Davej,
So incredible silly of me! I have searched the document several times for any other "echo" or "print" without success, so I assumed that the echo above was the reason for the printed zero. But now I realised it was just a simple "0" that slipped in to the code :-S
Thanks for pointing me in the right direction!
But, I'm still curious about the "echo" in the form tag. Why is it needed and what does it do?
-
Hi,
I wonder why echo is needed in the following lite of code (for a safe form submission)? I have searched for an answer but everyone seems to discuss the htmlspecialchar thing, but noone explains the "echo".
<form method="post" action="<?php echo htmlspecialchars($_SERVER["PHP_SELF"]);?>">
When I use this piece of code it results in a zero printed out on my website...
Thanks a lot!
Why do I need to use echo in form submission?
in PHP
Posted
Thanks!
I get that echo is for printing, but why is that command used in the action tag? Why do I need to print anything there? I thought that I was only supposed to call a function? From my rather basic knowledge point of view, I would rather have it like this (without the echo):
<form method="post" action="<?php htmlspecialchars($_SERVER["PHP_SELF"]);?>">