/    Sign up×
Community /Pin to ProfileBookmark

automated email

I’ve recently set up an automated email for a [URL=”http://www.hp-ships.com/main_files/submitff3.htm”]submission form[/URL], which sends an email to [email][email protected][/email] when submitted, the php all works fine for that. I recieve an email with all the appropriate details.

[CODE]<?
$message = “Name: {$_POST[‘name’]}n”;
$message .= “PenName = {$_POST[‘penname’]}n”;
$message .= “FFTitle: {$_POST[‘fftitle’]}n”;
$message .= “Genre: {$_POST[‘genre’]}n”;
$message .= “Rating: {$_POST[‘rating’]}n”;
$message .= “Period = {$_POST[‘period’]}n”;
$message .= “PShip: {$_POST[‘pship’]}n”;
$message .= “Pship2: {$_POST[‘pship2’]}n”;
$message .= “SShip: {$_POST[‘sship’]}n”;
$message .= “SShip2 = {$_POST[‘sship2’]}n”;
$message .= “SShip3: {$_POST[‘sship3’]}n”;
$message .= “SShip4: {$_POST[‘sship4’]}n”;
$message .= “Summary: {$_POST[‘summary’]}n”;
$message .= “link1: {$_POST[‘link1’]}n”;
$message .= “link2 = {$_POST[‘link2’]}n”;
$message .= “link3: {$_POST[‘link3’]}n”;
$message .= “link4: {$_POST[‘link4’]}n”;
$message .= “link5 = {$_POST[‘link5’]}n”;
$to = “[email protected]”;
$subject = “HP-Ships.com Listing”;
$mailheaders =”From: {$_POST[‘name’]} {$_POST[’email’]}n”;

mail($to,$subject,$message,$mailheaders);
header( “Location: http://www.hp-ships.com/thanks.html” );
?>[/CODE]

That’s the php code.

If I use the form and enter content into all but the ‘name’ field, the automated email sends. However when I enter content into the ‘name’ field I don’t recieve an email. ‘Name’ is the only field that causes this problem.
[URL=”http://www.hp-ships.com/main_files/submitff2.htm”]Have a look at the form to get an idea.[/URL]

The automated email is one of the features my host offers so I don’t have coding to show.

I don’t know enough about php to see if there might be a problem with that.

Any help would be great! I’m going quietly insane ?

to post a comment
PHP

5 Comments(s)

Copy linkTweet thisAlerts:
@aussie_girlFeb 11.2007 — change

$message = "Name: {$_GET['name']}n"; to

$message = "Name: {$_
POST['name']}n"; see if that helps
Copy linkTweet thisAlerts:
@LyssauthorFeb 11.2007 — Sorry, I forgot to change that back, it was originally post, I thought get might do something....but it didn't.
Copy linkTweet thisAlerts:
@NightShift58Feb 11.2007 — Change this line form:[code=php]$mailheaders ="From: {$_POST['name']} {$_POST['email']}n";[/code]to:[code=php]$mailheaders = "From: " . $_POST['name'] . "<" . $_POST['email'] . ">n"; [/code]
Copy linkTweet thisAlerts:
@LyssauthorFeb 11.2007 — Yay! it worked. Thankyou ?
Copy linkTweet thisAlerts:
@NightShift58Feb 11.2007 — You're welcome!
×

Success!

Help @Lyss spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.13,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...