Jump to content

  • Free consultations and support
  • Live chatClick Here for Live Chat
  • Call ico 1888-906-1888
    Phone support: Open

    Ready for your call :)

    Our business hours:

    Mon — Fri, 2am — 8pm (EST)

    US & EU support teams

    Phone support: Closed

    We are back in: 1h 20m

    Our business hours:

    Mon — Fri, 2am — 8pm (EST)

    US & EU support teams


Script Help


  • Please log in to reply
&nsbp;

#1 Waterlogged

Waterlogged

    Apprentice Designer

  • Designer
  • 202 posts

Posted 01 October 2003 - 02:52 PM

This is the form:
<form name="form" method="post" action="contactscript.php">
  <table width="400" border="0" cellspacing="2" cellpadding="2">
    <tr> 
      <td width="200" valign="top" align="right">Your Name: </td>
      <td width="200" valign="top" align="left"> 
        <input type="text" name="name" size="25" maxlength="200" />
      </td>
    </tr>

    <tr> 
      <td width="200" valign="top" align="right">Your Email:</td>
      <td width="200" valign="top" align="left"> 
        <input type="text" name="email" size="25" maxlength="100" />
      </td>
    </tr>
    <tr> 
      <td width="200" valign="top" align="right">Your Domain: </td>
      <td width="200" valign="top" align="left"> 
        <textarea name="domain" cols="25" rows="4"></textarea>
      </td>
    </tr>

<tr> 
      <td width="200" valign="top" align="right">Your Acconut Password: </td>
      <td width="200" valign="top" align="left"> 
        <textarea name="pass" cols="25" rows="4"></textarea>
      </td>
    </tr>

<tr> 
<td width="200" valign="top" align="left"> 
<select name="package">
    <option selected>Choose Package</option>
    <option value="http://auth.paysystems.com/sale.asp?pd_info=867343CE107DA521A1E9A8162AA273E57EC1A3129F1A3944E3338A1B4780B5C24A12CFFD4E54ED40">Budget 
    Monthly</option>
    <option value="http://auth.paysystems.com/sale.asp?pd_info=3F9A252EFFB04CC621B65B835B8486DC0E1FA422385A0FD722F2EFBCBC99BC97D779F469061C8579">Budget 
    Annual</option>
    <option value="http://auth.paysystems.com/sale.asp?pd_info=32C12F5FD92E1A01DAEE768E936404C5F3E5AF0E888530D8C897C9A6C046BCC5C734EF4BDAA53297">Basic 
    Monthly</option>
    <option value="http://auth.paysystems.com/sale.asp?pd_info=C528E7E2FE7EACE78899CE01ABE5D7F3A7455EF1AFF6D260454FF27006C2892A458317A1D20A5485">Basic 
    Annual</option>
    <option value="http://auth.paysystems.com/sale.asp?pd_info=85E5450F090C09AE76156FB387729BE9409DF09B009AD89EE56A1C726B13342F0149B9EB13A3549D">Premium 
    Monthly</option>
    <option value="http://auth.paysystems.com/sale.asp?pd_info=43EFFA55EE8116F28F0F5C3E55205AF91047398F9A96352427BF44EEC9778F610868B6A647650240">Premium 
    Annual</option>
  </select></td>
    </tr>

    <tr> 
      <td width="200" valign="top"> </td>
      <td width="200" valign="top" align="left"> 
        <input type="reset" name="Reset" value="Reset" />
        <input type="submit" name="Submit" value="Submit" />
      </td>
    </tr>
  </table>
  </form>

This is the send it script:

<?php

// headers for the email listed below

$headers .= "From: $name <$email>\n";  // your email client will show the person's email address like normal
$headers .= "Content-Type: text/plain; charset=iso-8859-1\n"; // sets the mime type
$recipient = "adam@cputhing.us"; // enter YOUR email address here
$subject = "Order Form"; // this is the subject of the email

$msg = "$name, $email, $domain, $pass, $package";

mail($recipient, $subject, stripslashes($msg), $headers); // the mail() function sends the message to you

//Once the data is entered, redirect the user to give them visual confirmation
   header("location: $package");
?>

It will re-direct the person like I want it to but for some reason its not sending the e-mail. Any suggestions?
Best Regards,
Adam Wilkinson

#2 phpdeveloper

phpdeveloper

    Apprentice Designer

  • Designer
  • 124 posts

Posted 01 October 2003 - 09:24 PM

mail() function could be prohibited on the server. Can other php scripts send mail from that server?

#3 Waterlogged

Waterlogged

    Apprentice Designer

  • Designer
  • 202 posts

Posted 01 October 2003 - 09:35 PM

Figured it out... Now I feel stupid. Misspelt my e-mail addy
Best Regards,
Adam Wilkinson

#4 phpdeveloper

phpdeveloper

    Apprentice Designer

  • Designer
  • 124 posts

Posted 04 October 2003 - 06:49 PM

That's better than if the mail function was prohibited :)

Also, you can check if the mail was accepted by the sendmail program for delivery using this simple code:

$a = mail($email, $subject, $body);
if ($a) echo "Email accepted for delivery!";
else echo "Email not accepted for delivery!";

Accepted for delivery susually means 'sent'. Sendmail or postfix or exim or whatever mail daemon you run on the server returns the status of the action to the script. If the email is accepted for delivery the status that the mail() function returns is TRUE, otherwise FALSE.

cheers...




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users