SitePoint Sponsor

User Tag List

Results 1 to 12 of 12

Threaded View

  1. #1
    SitePoint Enthusiast dannbkk's Avatar
    Join Date
    Jan 2007
    Posts
    76
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Email & Database submission

    Once this form is submitted the info goes to database, but for some reason its im not getting a copy to my email which i should be, im not understanding why? what code will i need to add or modify to get a copy to my email account...

    PHP Code:
    <?php
    require_once('db.inc.php');
    if (isset(
    $_POST['sell_submit'])) {
        if (
    $_POST['biz_type'] == 'Business Type' || $_POST['email'] == 'Email Address') {
          echo 
    'Please hit the back button and fill up the 2 fields.';
          exit();
        } elseif (!
    eregi("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})$"$_POST['email'])) {
            echo 
    'Email not valid.';
            exit();
          } else {
            
    $to 'info@email.com';
            
    $eol "\r\n";
            
    $subject 'WEBSITE (Sell Business)';
            
    $headers .= 'From: Website Business<info@email.com>'.$eol;
            
    $headers .= 'Content-Type: text/html; charset=ISO-8859-1 '.$eol;
            
    $headers .= 'MIME-Version: 1.0 '.$eol;
            
    $headers .= "Message-ID: <".$now." TheSystem@".$_SERVER['SERVER_NAME'].">".$eol;
            
    $headers .= "X-Mailer: PHP v".phpversion().$eol;
            
    $body 'Someone had submitted the form at sell-submit.php and here\'s the informations,<br>';
            
    $body .= 'Email: '.$_POST['email'].'<br>';
            
    $body .= 'Business Type: '.$_POST['biz_type'].'<br>';
            
    $body .= 'Warm Regards,<br><br>';
            
    $body .= 'WEBSITE<br>';
            
    $body .= 'www.website.com<br>';
            
    $body .= 'www.website.com';
            
    mail($to$subject$body$headers);
            }
    ?>
    Last edited by dannbkk; Jun 11, 2007 at 01:34.
    Learn SEO - Join the community at GSEO.net
    SEO Book - SEO Revenge eBook
    Make Money Programs - No Fluff!
    Make Money Online


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •