Allow & in form submission

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
subtilty
Forum Newbie
Posts: 1
Joined: Mon Jan 22, 2007 10:22 am

Allow & in form submission

Post 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 :(
Daron
Forum Newbie
Posts: 11
Joined: Tue Oct 09, 2007 4:50 pm

Re: Allow & in form submission

Post 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.
User avatar
s.dot
Tranquility In Moderation
Posts: 5001
Joined: Sun Feb 06, 2005 7:18 pm
Location: Indiana

Post 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.
Set Search Time - A google chrome extension. When you search only results from the past year (or set time period) are displayed. Helps tremendously when using new technologies to avoid outdated results.
thewebdrivers
Forum Commoner
Posts: 41
Joined: Fri Aug 17, 2007 3:32 pm
Location: india
Contact:

Post by thewebdrivers »

replace & with &
Post Reply