Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
November 2, 2004, 7:20 pm
rate this thread
Re: how to use htmlspecialchars in the form - help
You only need it when you print out the previously entered informations
again, which is not the case with your form (no default value for the
Usually the code would look like this:
<input name="foo" value="<?php print htmlspecialchars($foo)?>">
where $foo contains the value that was entered in the text field before.
You could also try this:
<form action="formtest1.php?c=1" method="post">
<label for="keywords">Find results with these words:</label>
<input name="keywords" id="keywords" length="40">
<input type="submit" value="Search">
Labels make forms more accessible, especially when used for checkboxes
and radio buttons.