Results 1 to 6 of 6

Thread: PHP proccing Forum

  1. #1
    Join Date
    Nov 2008
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default PHP proccing Forum

    I have created a php file to process my web forum and for some reason, it does not want to work. Can anyone please help me? I am using Dreamweaver 8, if you need the html, please just ask and I will also post it. Thank you.
    Here is the code:
    PHP Code:
    <?php
    /* Subject and email variables */

        
    $emailSubject 'Website Comments';
        
    $webMaster 'baysidemarc@msn.com';
        
    /* Gathering Data Variables */

        
    $nameField $_POST['name'];
        
    $emailField $_POST['email'];
        
    $commentsField $_POST['comments'];
        
        
    $body = <<<EOD
    <br><hr><br>
    Name: 
    $name <br>
    Email: 
    $email <br>
    Comments: 
    $comments <br>
    EOD;

        
    $headers "From: $email\r\n";
        
    $headers .= "Content-type: txt/html\r\n";
        
    $success mail ($webMaster$emailSubject$body$headers);
        
    /* Results rendered as HTML */

        
    $theResults = <<<EOD 
    <html>
    <
    head>
    <
    meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
    <
    title>Thank you</title>
    <
    style type="text/css">
    <!--
    body {
        
    background-imageurl();
        
    background-color#0066FF;
    }
    .
    style2 {font-family"Walt Disney Script v4.1"font-size36ptcolor#3333CC; }
    .style28 {
        
    font-size12pt;
        
    font-familyVerdanaArialHelveticasans-serif;
        
    color#000000;
    }
    -->
    </
    style>
    <
    style type="text/css">
    <!--
    .
    style31 {color#0000FF}
    -->
    </
    style>
    </
    head>
    <
    body>

    <
    h1>Thank you for your Emailit will be replyed to very shortly!</h1>
    </
    div>
    </
    body>
    </
    html>
    EOD;
    echo 
    "$theResults";
    ?>

  2. #2
    Join Date
    Jul 2006
    Location
    just north of Boston, MA
    Posts
    1,806
    Thanks
    13
    Thanked 72 Times in 72 Posts

    Default

    does your host support PHP on the server you are using?

  3. #3
    Join Date
    Aug 2005
    Location
    Other Side of My Monitor
    Posts
    3,494
    Thanks
    5
    Thanked 105 Times in 104 Posts
    Blog Entries
    1

    Default

    I love the old "it doesn't work" posts. I always picture a white page on the screen with a little gremlin sitting there arms crossed and pouting saying "I ain't working today, no sir!"

    Ahh, it cracks me up.. here is my code, you figure out what it is supposed to do, what it isn't doing and the errors I am seeing on my monitor. hahahaha
    {CWoT - Riddle } {Freelance Copywriter} {Learn to Write}
    Follow Me on Twitter: @InkingHubris
    PHP Code:
    $result mysql_query("SELECT finger FROM hand WHERE id=3");
    echo 
    $result

  4. #4
    Join Date
    Nov 2008
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by BLiZZaRD View Post
    I love the old "it doesn't work" posts. I always picture a white page on the screen with a little gremlin sitting there arms crossed and pouting saying "I ain't working today, no sir!"

    Ahh, it cracks me up.. here is my code, you figure out what it is supposed to do, what it isn't doing and the errors I am seeing on my monitor. hahahaha


    Give me a break, I have only been coding for a year, I don't know what's wrong with me asking only one little question. And by the way, my server does support php.

  5. #5
    Join Date
    Nov 2008
    Posts
    58
    Thanks
    0
    Thanked 7 Times in 7 Posts

    Default

    The obvious errors on first look is that you have different variable names while composing the email
    $name instead of $nameField in the email.

    The following pages also might help:
    get email from an HTML form submission

    PHP Form to email explained

  6. #6
    Join Date
    Nov 2008
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thanks for the help, but I still can't fix it.

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
  •