Forum Moderators: coopster

Message Too Old, No Replies

extra \ in the mail message

         

mtzheng

12:09 am on Jun 25, 2005 (gmt 0)

10+ Year Member



i use php to process mail form.
Mail was sent successfully.

but in the message

isn't that cool?

becomes

isn\'t that cool?

there's an extra slash. is there a way to fix this?

also when we check and validate the user input from the mail form,
is it better to do it on the server side or client side? i.e using javascrip or php?

regards

Burner

2:31 am on Jun 25, 2005 (gmt 0)

10+ Year Member



You need to stripslash your output...

[php.net...]

Burner

lobo235

2:31 am on Jun 25, 2005 (gmt 0)

10+ Year Member



doing form validation with PHP is much safer. There are an increasing number of people who are disabling javascript in their browsers. To avoid the extra slashses problem use the stripslashes() function that is built into php.

mtzheng

3:00 am on Jun 25, 2005 (gmt 0)

10+ Year Member



Thank you, thank you.
Burner and lobo235
That really fixed it.