Page 1 of 1

Allow & in form submission

Posted: Thu Oct 18, 2007 5:29 am
by subtilty
Hi Guys,

My first post here and I am still learning PHP so bare with me

I have a html form that submits to a php script which prints out the results into an email ready to send.

However if someone uses an Ampersand (&) in a company for example AT&T the script stops after the &.

Could you help me on how to change the script so it allows the character to de displayed and completes the script correctly?

Thanks Guys!

James

If you would like to see the script its http://www.excellhosting.net/cmc/notifi ... /form.html
Add a company name with a & and when you click on mail it doesnt work :(

Re: Allow & in form submission

Posted: Thu Oct 18, 2007 8:03 am
by Daron
subtilty wrote: If you would like to see the script its http://www.excellhosting.net/cmc/notifi ... /form.html
Add a company name with a & and when you click on mail it doesnt work :(
I may be mistaken, but the form is not really going to help. If you could post some code it would certainly be more helpful. Not the entire thing, but at least the offending portion.

Posted: Thu Oct 18, 2007 8:06 am
by s.dot
If you're passing it through $_GET, I can see this being a problem. Use htmlentities() on your $_GET data, or send it through post.

Posted: Thu Oct 18, 2007 9:27 am
by thewebdrivers
replace & with &