|
-
Sep 4th, 2002, 09:50 AM
#1
Thread Starter
Addicted Member
Form Validation
Heres a tricky one, I'm working on a bulletin board (The Hobo's thread inspired me to try) and its going all well but I'm worried about one thing. What I do is I take their input for a thread from the textarea and run it through a php function that does some standard str_replaces... but my problem is, how do I know when to take out stuff if they slap a <? in the textarea. I don't want them to put <? phpinfo() ?> in the message of my message board and then it print out the actual php info or other things. How can I avoid that?
-
Sep 4th, 2002, 11:58 AM
#2
PowerPoster
Run their input through the htmlspecialchars function, it will solve all your problems at once
-
Sep 4th, 2002, 12:20 PM
#3
Thread Starter
Addicted Member
wow, thats a great function, I never knew they had that. Thanks.
-
Sep 4th, 2002, 12:26 PM
#4
PowerPoster
yep, PHP is full of little gems like that
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|