PDA

View Full Version : No HTML in forms


theagro
04-23-2006, 03:32 PM
Is there a quick way in DW8 to set a text area where a visitor is not allowed to enter HTML into the form.... (i.e guestbook comment area)

dthomsen8
04-23-2006, 03:54 PM
Is there a quick way in DW8 to set a text area where a visitor is not allowed to enter HTML into the form.... (i.e guestbook comment area)

PHP is frequently used to check on information in a form, and to reject blunders by the user. For example, an email address has to have an @ sign and other characteristics. No reason you couldn't do the same for < and > signs, rejecting rather than requiring them.

Why would users want to put HTML into a form on your site?

theagro
04-23-2006, 03:58 PM
PHP is frequently used to check on information in a form, and to reject blunders by the user. For example, an email address has to have an @ sign and other characteristics. No reason you couldn't do the same for < and > signs, rejecting rather than requiring them.

Why would users want to put HTML into a form on your site?

I have had some spamming of a guestbook for a client and I am looking for a way to stop it.
I guess I could make the signing of the guestbook a 3 part process....

domedia
04-23-2006, 05:11 PM
If I remember right there is a function in PHP to strip out all html.
This is dependent on server side language.
Which do you use?

dthomsen8
04-23-2006, 11:11 PM
PHP is frequently used to check on information in a form, and to reject blunders by the user. For example, an email address has to have an @ sign and other characteristics. No reason you couldn't do the same for < and > signs, rejecting rather than requiring them.

Why would users want to put HTML into a form on your site?

I have had some spamming of a guestbook for a client and I am looking for a way to stop it.
I guess I could make the signing of the guestbook a 3 part process....

The action from the form can reject HTML back to the user, or else you could strip out the HTML with PHP along the lines that domedia suggests.

Can you handle some PHP, and does your web hosting company support PHP? (Most do support PHP.)

theagro
04-24-2006, 02:34 AM
Oh yeah, I only use PHP