PHP E-Mail Form

  Ade_1 16:21 28 Jun 2006

Hi, i know there have most probably been hundreds of posts on PHP forms. But i just wanted everything packing into one. So, where abouts can i find a secure PHP e-mail form where it "hides" the e-mail address.

Apologies as i know this has been posted before however i wanted just a simple answer that i know will accomodate my needs

Thanks in advance

  ade.h 17:38 28 Jun 2006

Hi Aidan.

Funny you should ask this, with me having been through the PHP wringer recently! LOL.

Firstly, all PHP mail forms hide the address. There is an extra bit of code that is needed to bring up your form.html page if anyone tries to guess the address of your PHP form. There is also some code that will prevent your form being used to send spam mail. click here

Sites that I used, apart from this one obviously, include click here and click here

I'll post a copy of my code in a mo so that you can see what's what.

  Ade_1 17:48 28 Jun 2006

Ok, thanks for that, i have seem various codes on the internet but wasnt 100% sure about them and just wondered whats what and knew that by coming on here someone would be able to help me and explain :)

  ade.h 17:56 28 Jun 2006

Yeah, that's what I found. Lots of info - not much that's relevant to what I wanted to do.

click here and you'll see the code from one of my forms. Here's the form itself click here (work in progress right now). So you can see how the values and names relate to each other.

Note the spaces before the end quotemarks and semicolons in the mail_message part; this forces each bit of info to start on a new line in the email to make it easier to read.

My code does not currently include the anti-spam code, but it does have the bit that keeps the form hidden from guesswork. click here is the actual URL of the PHP file, but you won't see it.

Hope that helps. Any questions, let me know. If I can't help, harristweed was instrumental in helping me to understand all this stuff!

  Ade_1 18:07 28 Jun 2006

Thanks alot for the info Ade. I especially found the site wizards site a good help, but I think after looking at yours I would like to make mine more advanced rather than just Name Subject and Comments however I believe its best to start off basic and then to advance slowly.

Thanks for all your help, it is much appriciated.


  ade.h 18:38 28 Jun 2006

I have others that are more sophisticated, but I thought it would be better to show you that one at first. It's easier to follow.

  Ade_1 18:52 28 Jun 2006

I must ask, the site wizard one, would be hidden from guesswork or not?

  ade.h 19:22 28 Jun 2006

If you mean the Site Wizard's example; yes, it would be hidden from guesswork, as that's where I got that part of the code from. It's the "!isset" bit in the second section of code. Just copy that verbatim and add the URL of your contact form, or even a blank page if you prefer.

  Ade_1 19:27 28 Jun 2006

ok thanks :).
Apologies for this, it may seem an odd question but just making sure I am ok in what I am doing. I was also wondering if it is compulsory for me to leave the "powered by sitewizard" link underneath the submit button or am I ok to take it out?

Sorry about a silly question but I thought i'd best be sure!

Thanks again


  ade.h 19:44 28 Jun 2006

Yeah, you can take out anything that isn't actual code. Anything before the left chevron or after the right chevron. < >

  Ade_1 19:45 28 Jun 2006

Ok. Thanks for everything :)

This thread is now locked and can not be replied to.

Elsewhere on IDG sites

Xiaomi Mi Mix 2 review

What went wrong at the Designs of the Year 2017

iPhone X news: Release date, price, new features & specs

Comment regarder des séries et talk-shows américains en France ?