View Single Post
  #1 (permalink)  
Old August 13th, 2005, 03:19 PM
mdchan mdchan is offline
Registered User
 
Join Date: Aug 2005
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Chapter 4 "<<>>" characters in form

If you write "<<some words>>" in "Movie Description", and click "Add", the "form4.php?step=2" only shows "<>" on the screen.
How to correct this?
Thanks.

Here is a small test i have written.
<html>
<form action="<?php $_SERVER['PHP_SELF'];?>">
Name: <input type="TEXT" name="name" value="<<a name>>"><br>
Comments: <TEXTAREA NAME="comments" COLS=20 ROWS=2><<a comment>></TEXTAREA><br>
<input type="submit" value="go">
</form>
</html>
<?php
echo $_GET['name'] . '<br>';
echo $_GET['comments']. '<br>';
echo htmlspecialchars($_GET['name']). '<br>';
echo htmlspecialchars($_GET['comments']). '<br>';
print_r ($_GET);
//printout
/*
<>
<>
<<a name>>
<<a comment>>
Array ( [name] => <> [comments] => <> )
*/
?>
Reply With Quote