Results 1 to 6 of 6

Thread: Creating a form feedback....

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Dec 2002
    Location
    New York
    Posts
    74

    Creating a form feedback....

    I have been able to get an email once the data was submitted...

    Now I am trying to add another box to enter data and I get an error....

    Please help!


    The Form is here!

    This is the error message I keep getting!

  2. #2
    PowerPoster
    Join Date
    Sep 2003
    Location
    Edmonton, AB, Canada
    Posts
    2,629

    Re: Creating a form feedback....

    you know, just giving us the HTML form and the error message is not going to help.

    you need to post some from your sendmail.php script, preferably the lines surrounding the error (line 8).. so post the first 16 lines of the script and someone can probably help you.

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Dec 2002
    Location
    New York
    Posts
    74

    Re: Creating a form feedback....

    I knew I was missing something....Sorry

    This is the html document!
    Code:
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <title>Feedback Form</title>
    <link rel="stylesheet" href="feedback.css" type="text/css" />
    </head>
    <body>
    <form method="post" action="sendmail.php">
      <p>Name: 
        <input name="name" type="text" id="name" />
      </p>
      <p>Email:
        <input name="email2" type="text" />
        <br />
        Message:<br />
        <textarea name="message" rows="20" cols="60">
      </textarea>
        <br />
        <input type="submit" />
        </p>
    </form>
    </body>
    </html>
    Here is the sendmail.php document:

    Code:
    <?
      $email = $_REQUEST['email'] ;
      $name = $_REQUEST['name'] ;
      $message = $_REQUEST['message'] ;
    
      mail( "[email protected]", "Feedback Form Results",
        $message, "From: $email" );
    	$name, "From: $email" );
      header( "Location: http://robbyzworld.com/personal/myMLB/DH/thankyou.html" );
    ?>

  4. #4
    PowerPoster
    Join Date
    Sep 2003
    Location
    Edmonton, AB, Canada
    Posts
    2,629

    Re: Creating a form feedback....

    you have an extra line that shouldn't be there. try this:

    PHP Code:
    <?
      $email = $_REQUEST['email'] ;
      $name = $_REQUEST['name'] ;
      $message = $_REQUEST['message'] ;

      mail( "[email protected]", "Feedback Form Results",
        $message, "From: $email" );
      header( "Location: http://robbyzworld.com/personal/myMLB/DH/thankyou.html" );
    ?>
    you have a terribly written script from my standpoint (no error validation, etc), but.. i guess it works.

  5. #5

    Thread Starter
    Lively Member
    Join Date
    Dec 2002
    Location
    New York
    Posts
    74

    Re: Creating a form feedback....

    Hey buddy ok, it fixed that problem but what I wanted to have happen was in the email that I got the details that were filled out to all be filled in the email.

    Right now all I get is the message text.


    Quote Originally Posted by kows
    you have an extra line that shouldn't be there. try this:

    PHP Code:
    <?
      $email = $_REQUEST['email'] ;
      $name = $_REQUEST['name'] ;
      $message = $_REQUEST['message'] ;

      mail( "[email protected]", "Feedback Form Results",
        $message, "From: $email" );
      header( "Location: http://robbyzworld.com/personal/myMLB/DH/thankyou.html" );
    ?>
    you have a terribly written script from my standpoint (no error validation, etc), but.. i guess it works.

  6. #6
    PowerPoster
    Join Date
    Sep 2003
    Location
    Edmonton, AB, Canada
    Posts
    2,629

    Re: Creating a form feedback....

    uhh.. add the rest of the stuff to the message then..?

    PHP Code:
    $themessage "this message has been sent from something something something

    their email: 
    $email
    their name: 
    $name
    their message:
    $message

    this message was sent on " 
    date("Y-m-d @ h:i:s a") . "."
    then call mail() with $themessage instead of $message.

Posting Permissions

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



Click Here to Expand Forum to Full Width