/    Sign up×
Community /Pin to ProfileBookmark

I’m trying to send data from a simple form to an email address.
I’ve got everything put together, and it takes you to the php page, but it returns blank.

[url]http://org.elon.edu/sigmakappa/alumnae2.html[/url]

it redirects to [url]http://org.elon.edu/sigmakappa/alumnaeConfirm.php[/url]

any ideas?

thanks.

to post a comment
PHP

5 Comments(s)

Copy linkTweet thisAlerts:
@zackbloomFeb 23.2007 — We can't see the php code, please post the php file.
Copy linkTweet thisAlerts:
@Warfman99authorFeb 23.2007 — my bad...

here it is:

<?php

$headers = "From: [email][email protected][/email] rn";

"X-Mailer: php";

$email = 'Name= '. $_POST['name'] . "n"

. 'Address= '. $_
POST['address'] . "n"

.'City= '. $_POST['city'] . "n"

.'State= '. $_
POST['state'] . "n"

.'Zip= '. $_POST['zip'] . "n"

.'Phone= '. $_
POST['phone'] . "n"

.'Email= '. $_POST['email'] . "n"

.'Update= '. $_
POST['info'] . "n";

mail('[email protected]','EK Alumnae Update',$email, $headers);

?>
Copy linkTweet thisAlerts:
@zackbloomFeb 23.2007 — Does the email get sent? That code won't output anything to the screen. If its not getting sent try echoing $headers and $email to see if they are correct.
Copy linkTweet thisAlerts:
@Warfman99authorFeb 23.2007 — no, it won't send the email.

i've got an entire html page designed on alumnaeConfirm.php

i just cut and paste the php script.

i don't understand why the html page isn't even showing up.

and i just tried to attach the entire alumnaeConfirm.php page,

and i got an error message... "Invalid File"

i've never gotten that before.

that could be where the problem lies.

i'm pretty sure there are other ways to send a simple form through email.

are you familiar with a different way, if we don't know why this one is working??
Copy linkTweet thisAlerts:
@zackbloomFeb 23.2007 — The mail function will not work for a whole host of reasons. Does it work if you just put
[code=php]
mail('toaddr','test','test');
[/code]

replacing toaddr with an email address. There are other ways to send emails but there much more complicated.
×

Success!

Help @Warfman99 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.3,
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: @Yussuf4331,
tipped: article
amount: 1000 SATS,

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

tipper: @Samric24,
tipped: article
amount: 1000 SATS,
)...