|
11-09-2005, 12:32 PM | #1 |
Green Mole
Join Date: Nov 2005
Posts: 1
|
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 |
11-10-2005, 11:00 PM | #2 |
Head Mole
Join Date: May 2003
Posts: 2,539
|
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.
__________________
Responses are offered on a voluntary if/as time is available basis, no guarantees. Double posting or bumping threads will not get your question answered any faster. No support via PM or email, responses not guaranteed. Thank you for your comprehension. |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Config on windows box- Document contains no data | jozzy | Troubleshooting | 3 | 08-22-2005 07:36 AM |
Re-indexing Data Base Fast | ezytrak | Troubleshooting | 1 | 03-15-2005 10:01 AM |
How to use form data to create XML??? | retrodog | Coding & Tutorials | 1 | 03-15-2005 09:45 AM |
Request: Meta-Data ~ | jeremiah | Mod Requests | 1 | 07-14-2004 08:55 PM |
Searching data in MySQL database | maheshg | How-to Forum | 3 | 03-24-2004 11:21 AM |