Email forms
Hi, this is my first time using a forum. I have been creating websites now for about a year after taking abasic course at college. I keep coming up with problems (as we all do) some are really basic that I just can't sort on my own (lack of knowledge).
I have entered a script for an email form, everything works except when the email arrives from my site to my email box the attatchment says POSTDATA.ATT and I can't open it. What does this mean, can anyone help me.
Thanks in advance
Gill
The Webmistress posted this at 09:58 — 26th October 2005.
She has: 5,586 posts
Joined: Feb 2001
Welcome to the Forums! :wave:
Can you post us the URL of the page the form is on so that we can see if the set up is causing it?
Gillian posted this at 10:14 — 26th October 2005.
They have: 3 posts
Joined: Oct 2005
Hi
Thanks for replying so quickly.
I have managed to open the attachment by saving it and then opening it in notepad but it would be nice to see it on the actual email.
The URL is blueastral.co.uk/contact.htm
Thanks
Gill
DC_Sara posted this at 12:01 — 26th October 2005.
She has: 392 posts
Joined: Jan 2002
You can see the form I use here. Let me know if you want it.
Gillian posted this at 13:13 — 26th October 2005.
They have: 3 posts
Joined: Oct 2005
Yes please that would be great thanks
DC_Sara posted this at 19:14 — 26th October 2005.
She has: 392 posts
Joined: Jan 2002
You can just copy and paste the following .txt file and it should do what you want it to do. Just replace Web Girlie everywhere and make sure you put in your email address.
~*Sara*~
Busy posted this at 20:48 — 26th October 2005.
He has: 6,151 posts
Joined: May 2001
Gillian, usually it's your code that causes the .att attachment. I have a wicked headache at the moment and it's not up to looking through frontpages mess, so you can look in your source code and see how many tags you have. I had a quick look and it looks like the select option is not in between the form tags, you also have the thankyou reminder with full html tags at the bottom of the page that needs removing, but thats frontpage for you.
Also the ?subject=... doesn't work on some of the latest browsers, and will cause the mailto tag not to work. Using a mailto is bad anyway as it invites spam, try use a server side form if possible (like gregsbaby64 example or hotscripts.com or similar)
gregsbaby64, web forms (server side) should have a bit more validation than what you have, for one, all variables from the form should be $_POST[value] to help stop email spam, they should also make use of functions like trim(), htmlspecialchars(), even check the email address it self so it only is one address and is valid, otherwise it can be abused - I wont put how it can on here.
DC_Sara posted this at 23:10 — 26th October 2005.
She has: 392 posts
Joined: Jan 2002
Busy, I didn't write the form, just posted it as requested.
Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.