homepage Welcome to WebmasterWorld Guest from 23.20.63.27
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
Visit PubCon.com
Home / Forums Index / Code, Content, and Presentation / Perl Server Side CGI Scripting
Forum Library, Charter, Moderators: coopster & jatar k & phranque

Perl Server Side CGI Scripting Forum

    
PHP form sends blank emails - fixes suggested not worked
php form blank email
GirlAboutTown




msg:3993394
 11:48 am on Sep 22, 2009 (gmt 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?!

 

Pico_Train




msg:3993493
 3:23 pm on Sep 22, 2009 (gmt 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...

rocknbil




msg:3994280
 5:43 pm on Sep 23, 2009 (gmt 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.

dreamcatcher




msg:3994696
 6:46 am on Sep 24, 2009 (gmt 0)

Hi GirlAboutTown, welcome to Webmaster World. :)

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

dc

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / Perl Server Side CGI Scripting
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved