Web page project

Discussion in 'Web Programming' started by MohtasaUnique, Mar 5, 2014.

Web page project
  1. Unread #1 - Mar 5, 2014 at 6:41 AM
  2. MohtasaUnique
    Joined:
    Sep 1, 2007
    Posts:
    6,681
    Referrals:
    2
    Sythe Gold:
    690
    Discord Unique ID:
    158831078964985856
    Discord Username:
    Tony#2235

    MohtasaUnique Grand Master
    Retired Global Moderator

    Web page project

    http://tonybenwhite.byethost8.com/WSAWebpage/test.html

    I've got most of the inner workings functioning as needed, but the PHP page I have set up with the following code doesn't actually send me any emails as intended... I checked and the free host I use DOES support PHP, so idk. Here's the code:
    PHP:
    <?php
        
    if(isset($_POST['send'])){
            
    $to_address="[email protected]";
            
    $subject="WSA Day of Action Entry";
            
    $firstname=$_POST['firstname'];
            
    $lastname=$_POST['lastname'];
            
    $email=$_POST['email'];
            
    $street1=$_POST['street1'];
            
    $street2=$_POST['street2'];
            
    $city=$_POST['city'];
            
    $state=$_POST['state'];
            
    $zip=$_POST['zip'];
            
    $initials=$_POST['initials'];
            
    $message="Name: " .$firstname." ".$lastname."\n";
            
    $message .="Email: " .$email."\n";
            
    $message .="Street: " .$street1."\n";
            
    $message .="Street: " .$street2."\n";
            
    $message .="City: " .$city."\n";
            
    $message .="State: " .$state."\n";
            
    $message .="Zip Code: " .$zip."\n";
            
    $message .="Initials: " .$initials."\n";
            
    $headers 'From: '.$email."\r\n".
            
    $headers  'MIME-Version: 1.0' "\r\n";
            
    $headers .= 'Content-type: text/html; charset=iso-8859-1' "\r\n";
            
    'X-Mailer: PHP/' .phpversion();
            
    mail($to_address$subject$message$headers);
            }
    ?><!DOCTYPE HTML>
     
    <html>
    <body>
    Thank you!
    </body>
    </html>
    Any idea on why?
     
  3. Unread #2 - Mar 8, 2014 at 11:32 PM
  4. Nick 91
    Joined:
    Apr 29, 2013
    Posts:
    873
    Referrals:
    0
    Sythe Gold:
    0

    Nick 91 full stack web developer + nikola.katic.91 skype
    Banned

    Web page project

    Your <inputs> need to have a name=""
    The PHP POST value looks for an input value with the name specified.

    for example, <input name="email" value="type email here" />
    you have id="email"
     
  5. Unread #3 - Mar 9, 2014 at 5:25 PM
  6. MohtasaUnique
    Joined:
    Sep 1, 2007
    Posts:
    6,681
    Referrals:
    2
    Sythe Gold:
    690
    Discord Unique ID:
    158831078964985856
    Discord Username:
    Tony#2235

    MohtasaUnique Grand Master
    Retired Global Moderator

    Web page project

    Oops I broke something with the page, erased a <style> tag


    Anyway, I'll try what you suggested
     
  7. Unread #4 - Mar 9, 2014 at 5:31 PM
  8. MohtasaUnique
    Joined:
    Sep 1, 2007
    Posts:
    6,681
    Referrals:
    2
    Sythe Gold:
    690
    Discord Unique ID:
    158831078964985856
    Discord Username:
    Tony#2235

    MohtasaUnique Grand Master
    Retired Global Moderator

    Web page project

    No dice. I've got ID and Name values in all my input tags, but it still doesn't send the email
     
  9. Unread #5 - Mar 16, 2014 at 11:36 PM
  10. Toulouse
    Joined:
    Jul 30, 2013
    Posts:
    87
    Referrals:
    0
    Sythe Gold:
    0

    Toulouse Member

    Web page project



    Code:
            $headers = 'From: '.$email."\r\n".
            $headers  = 'MIME-Version: 1.0' . "\r\n";
            $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
            'X-Mailer: PHP/' .phpversion();
    
    to

    Code:
            $headers = 'From: '.$email."\r\n".
            $headers  .= 'MIME-Version: 1.0' . "\r\n";
            $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
            $headers .= 'X-Mailer: PHP/' .phpversion();
    
     
< Looking for somebody who can make me a simple payment page | Looking for site to code and work with! [free] >

Users viewing this thread
1 guest


 
 
Adblock breaks this site