Welcome to WebmasterWorld Guest from 54.167.102.69

Forum Moderators: coopster & jatar k & phranque

Message Too Old, No Replies

PHP form sends blank emails - fixes suggested not worked

php form blank email

     
11:48 am on Sep 22, 2009 (gmt 0)

New User

5+ Year Member

joined:Sept 22, 2009
posts: 1
votes: 0


I'm working on a form - it works except that it sends me a blank email. I have no idea what's happening and very little (none) PHP experience. Can anyone assist me with what the issue is here?

The form is:

<FORM METHOD="POST" target="_top" ACTION="/cgi-bin/formmail/FormMail.pl">
<INPUT TYPE="HIDDEN" NAME="recipient" VALUE="myemail@email.com.au">
<INPUT TYPE="hidden" NAME="subject" VALUE="Newsletter enquiry">
<input type="hidden" name="redirect" value="http://www.xxmysitexx.html">
<input type="hidden" name="missing_fields_redirect" value="http://www.xxmysitexx.html">
<input type="hidden" name="print_config" value="name,phone,e-mail">
<p><label for="name">First Name</label> <input type="text" id="name" /></p>
<p><label for="phone">Last Name</label> <input type="text" id="phone" /></p>
<p><label for="e-mail">Email</label> <input type="text" id="e-mail" /></p>
<p class="submit"></p>
<p>
<input type="submit" value="Submit" margin-left="auto" />
</p>
</form>

Anyone?!

3:23 pm on Sept 22, 2009 (gmt 0)

Preferred Member

10+ Year Member

joined:Jan 4, 2005
posts:621
votes: 0


Your form uses Perl and not php but anyway...

These are probably incorrect:

<input type="text" id="name" />
<input type="text" id="phone" />
<input type="text" id="e-mail" />

They should probably be:

<input type="text" id="name" name="name" />
<input type="text" id="phone" name="phone"/>
<input type="text" id="e-mail" name="email"/>

Try that and see what happens...

5:43 pm on Sept 23, 2009 (gmt 0)

Senior Member

WebmasterWorld Senior Member rocknbil is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Nov 28, 2004
posts:7999
votes: 0


Welcome aboard GirlAboutTown! (What town are you about? JUST KIDDING . . . . )

Correct, and the explanation behind that is names are used to assign key/value pairs to transmit the data to the server, ids are used to manipulate the document client side via CSS, Javascript, or other technologies.

However, this generic script is well known for being abused by spammers, and is a headache waiting to happen for you, beginning with

<INPUT TYPE="HIDDEN" NAME="recipient" VALUE="myemail@email.com.au">

Although it's a hidden field, this is an appetizer for email spiders. They will read your page and find this email, drop it into a spam list. If you have access to this script, hard code the email address into the script, at the very least.

6:46 am on Sept 24, 2009 (gmt 0)

Senior Member

WebmasterWorld Senior Member dreamcatcher is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Mar 30, 2003
posts:3719
votes: 0


Hi GirlAboutTown, welcome to Webmaster World. :)

I moved this thread to Perl. As previously mentioned, its not PHP.

dc

 

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members