![]() |
Noob question about form data
When ever I use ' or " in a form text box and display it back on the page using php it appears with a \ in front of it. Is there anyway to avoid this extra character being added?
For example: "What's Up" entered into a text box would be displayed on the page as "What\'s Up |
Use htmlspecialchars(stripslashes($foo),ENT_QUOTES) when echoing form field input back onscreen. Use urlencode(stripslashes($foo)) when forming a link. Also check out this page for more tips and examples related to PHP and HTML output.
|
All times are GMT -8. The time now is 10:17 PM. |
Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright © 2001 - 2005, ThinkDing LLC. All Rights Reserved.