Jump to content


Photo

Simple PHP Mail


  • Please log in to reply
1 reply to this topic

#1 tamandt

tamandt
  • New Members
  • Pip
  • Newbie
  • 1 posts

Posted 17 October 2006 - 02:22 PM

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.

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


<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>

Thanks for your help.

#2 tomfmason

tomfmason
  • Staff Alumni
  • Advanced Member
  • 1,696 posts
  • Locationstealing your wifi

Posted 17 October 2006 - 02:39 PM

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

Traveling East in search of instruction, and West to propagate the knowledge I have had gained.

current projects: pokersource

My Blog | My Pastebin | PHP Validation class | Backtrack linux





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users