p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   BOOK: Beginning PHP, Apache, MySQL Web Development ISBN: 978-0-7645-5744-6 (http://p2p.wrox.com/forumdisplay.php?f=123)
-   -   Chapter 4 "<<>>" characters in form (http://p2p.wrox.com/showthread.php?t=32465)

mdchan August 13th, 2005 03:19 PM

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] => <> )
*/
?>


All times are GMT -4. The time now is 08:22 PM.

Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.