Problem with double quotes and Input

Posted by Axel on Stack Overflow See other posts from Stack Overflow or by Axel
Published on 2010-04-01T20:07:31Z Indexed on 2010/04/01 20:13 UTC
Read the original article Hit count: 289

Filed under:
|

Hi, i have the following code :

 <input type="text" value="<?php echo $_GET['msg']; ?>">

This input is automatically filled with the name that is writen in the previous page. So, if the user wrote : i like "apples" and banana The input will be broken because it will close the tag after the double quotes. I know i can avoid that by html entiting the value, but i don't want this, is there another solution or is there an <<< EOD in html ?

Thanks

© Stack Overflow or respective owner

Related posts about html

Related posts about php