Jump to content

Archived

This topic is now archived and is closed to further replies.

tamandt

Simple PHP Mail

Recommended Posts

I am having trouble getting this script to work, any ideas would be appreciated.
This script works on my site, but not on a customers. I used to use the same host as my customer, so I know it is not a host issue.
I have replaced the email with XXXXX for privacy purposes.

[code]<?php
$name = $_GET['name'] ;
$email = $_GET['email'] ;
$subject = $_GET['subject'] ;
$txt = $_GET['txt'] ;
mail('XXXXXXXXXX,$subject,$txt,"From: $name <$email>");
header("location:afterorder.html");
?>[/code]


[code]<DIV ID="Email" STYLE="position:absolute;top:150;left:320;">
<form name="emailform" action="process.php" method="post" onSubmit="return validate();" >
<TABLE>
<TR>
<TD><B>Name:</B></TD>
<TD><input type="text" name="name" size="30" maxlength="30"></TD>
</TR>
<TR>
<TD><B>Email:</B></TD>
<TD><input type="text" name="email" size="30" maxlength="30"></TD>
</TR>
<TR>
<TD><B>Email Again:</B></TD>
<TD><input type="text" name="email2" size="30" maxlength="30"></TD>
</TR>
<TR>
<TD><B>Subject:</B></TD>
<TD><input type="text" name="subject" size="30" maxlength="30" readonly value="Serendipity Trail Order" ></TD>
</TR>
<TR>
<TD Colspan=2><textarea name="txt" cols="50" rows="10"></textarea></TD>
</TR>
</TABLE>
<input type="submit" name="submit" value="Send">
</form>
<BR><BR>
<B>When we receive your order we will e-mail you a total amount due<BR>
and the payment instructions. Please provide us with your shipping<BR>
address and once payment is received we will ship your item(s).</B>
</DIV>[/code]

Thanks for your help.

Share this post


Link to post
Share on other sites
Are you getting any errors with that.. Also, unless you are using javascript to post or Ajax to send the results.. I don't see how the results are ever going to get to the file. Your method in the form is post but you have the variables in your mail script as get..??

also, you need to have the from portion of the email as an email address that is known to the server.. i.e you@yourdomain.com

Good Luck,
Tom

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.