email function not working..

Discussion in 'Programming' started by VAN_XP, Mar 30, 2010.

  1. #1
    hi,

    i have just uploaded my website www.best-aura.com
    and i have edit file register.php by enter the email which should received the mail .. but it's not working ..

    here is the file >>> www.best-aura.com/register.rar
    and here is the instruction which provided by template deigned ..
    Setting up the register form
    To set up the register form you need to decide what you want to do with the email address when someone registers. There are two options available:
    
    Send you an email when someone registers
    Add their email address to your MySQL database
    The under construction template comes with the code you need to do both of these, you can set it up to do either one or both. By default you will be sent an email when someone registers.
    
    Setting the form up to send you an email when someone registers
    You must change register.php line 52 to your email address. E.g.
    $yourEmail = 'info@freerangewebdesign.com';
    
    Setting the form up to save the email address to a MySQL database
    To configure the form to add to your MySQL database there are two things you need to do. Firstly, you should change register.php lines 66-71 to match the correct information for your database set up. You will need to create the email list database and table manually, help on creating these is outside the scope of this document. An example configuration is displayed below.
    
    
    $yourDbHost = 'localhost';
    $yourDbUsername = 'db_user';
    $yourDbPassword = 'password1';
    $yourDbName = 'site_db';
    $yourTableName = 'mailing_list';
    $yourFieldName = 'email';
          Lastly, you will need to remove the comment from line 23 of register.php i.e.
    //saveToMysqlDb($email);
    becomes
    saveToMysqlDb($email);
    
    If you want to stop receiving emails when someone registers, comment out line 20 of register.php i.e.
    sendAlertEmail($email);
    becomes
    //sendAlertEmail($email);
    
    Note: any errors connecting to the MySQL database will be sent back to the form bubble, but it will disappear after 3 seconds due to the JavaScript effects. You can click the 'Update me' button to show the errors again and that should help you find the problem. If you want to disable the errors from ever being shown add this code on line 2 of register.php
    error_reporting(0);
    
    Note: you need a PHP enabled web server for the register form to work and your PHP mail() function must be working if you are to be notified by email when someone registers. 
    PHP:
     
    VAN_XP, Mar 30, 2010 IP
  2. Zirkos

    Zirkos Greenhorn

    Messages:
    25
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    11
    #2
    Hi VAN_XP. It might be helpful to post what error you're getting and what you've tried to solve it.
     
    Zirkos, Mar 30, 2010 IP
  3. nimonogi

    nimonogi Active Member

    Messages:
    398
    Likes Received:
    3
    Best Answers:
    1
    Trophy Points:
    80
    #3
    As Zirkos said, without the error output we can't help you.
    I can only imagine that there is a database connection problem. Check your database setting and let us know.
     
    nimonogi, Mar 30, 2010 IP