my php form

Discussion in 'PHP' started by drew68, Aug 25, 2006.

  1. #1
    hey guys...my form isn't working right now...i get this really long error...but here's my site http://www.writerlearning.com/send_preview.html and here's the code for the form

    "From: $_POST";
    $sub1 = 'New comment (writerlearning.org)';
    $message1 = 'Name : ' .$_POST["Name"] ."\r\n";
    $message1 .= 'Email : ' .$_POST["Email"] ."\r\n";
    $message1 .= 'Comments : ' .$_POST["Comments"] ."\r\n";
    $message1 .= 'Position : ' .$_POST["Position"] ."\r\n";
    $message1 .= 'School : ' .$_POST["School"] ."\r\n";
    $message1 .= 'Address : ' .$_POST["Address"] ."\r\n";
    $message1 .= 'City : ' .$_POST["City"] ."\r\n";
    $message1 .= 'State : ' .$_POST["State"] ."\r\n";
    $message1 .= 'Zip : ' .$_POST["Zip"] ."\r\n";
    $message1 .= 'Phone : ' .$_POST["Phone"] ."\r\n";
    $message1 .= 'Grade : ' .$_POST["Grade"] ."\r\n";
    $message1 .= 'Additional : ' .$_POST["Additional"] ."\r\n";
    $message1 .= 'How : ' .$_POST["How"] ."\r\n";
    mail ($admin_email, $sub1, $message1, $headers1);
    header("Location: http://writerlearning.com/thank_you.html");
    exit;
    }
    ?>

    when i click submit i get this error....

    "From: $_POST[Email]"; $sub1 = 'New comment (writerlearning.org)'; $message1 = 'Name : ' .$_POST["Name"] ."\r\n"; $message1 .= 'Email : ' .$_POST["Email"] ."\r\n"; $message1 .= 'Comments : ' .$_POST["Comments"] ."\r\n"; $message1 .= 'Position : ' .$_POST["Position"] ."\r\n"; $message1 .= 'School : ' .$_POST["School"] ."\r\n"; $message1 .= 'Address : ' .$_POST["Address"] ."\r\n"; $message1 .= 'City : ' .$_POST["City"] ."\r\n"; $message1 .= 'State : ' .$_POST["State"] ."\r\n"; $message1 .= 'Zip : ' .$_POST["Zip"] ."\r\n"; $message1 .= 'Phone : ' .$_POST["Phone"] ."\r\n"; $message1 .= 'Grade : ' .$_POST["Grade"] ."\r\n"; $message1 .= 'Additional : ' .$_POST["Additional"] ."\r\n"; $message1 .= 'How : ' .$_POST["How"] ."\r\n"; mail ($admin_email, $sub1, $message1, $headers1); header("Location: http://writerlearning.com/thank_you.html"); exit; } ?>



    it was working fine but my client said that when they receive a completed form from there customers..it comes in as writerlearning.org but they want it titled 'Writer Preview Request' instead...so i tried to change it to that but when i did it broke.

    can someone help?
     
    drew68, Aug 25, 2006 IP
  2. ahkip

    ahkip Prominent Member

    Messages:
    9,205
    Likes Received:
    647
    Best Answers:
    0
    Trophy Points:
    310
    #2
    ahkip, Aug 25, 2006 IP
  3. drew68

    drew68 Well-Known Member

    Messages:
    582
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    128
    #3
    hey ahkip...ya..that's the error i get...

    what do you mean show you? is there something i'm missing?

    thanks,
     
    drew68, Aug 25, 2006 IP
  4. Zany_Jim

    Zany_Jim Peon

    Messages:
    144
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #4
    you need to add <?php to the top of the php page.
     
    Zany_Jim, Aug 25, 2006 IP
  5. drew68

    drew68 Well-Known Member

    Messages:
    582
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    128
    #5
    lol k...i look stupid for asking now lol
     
    drew68, Aug 25, 2006 IP
  6. drew68

    drew68 Well-Known Member

    Messages:
    582
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    128
    #6
    well i got it to get rid of that error by putting that tag up top but it's redirecting to a blank page...it should be going to the thank you page...any ideas why that might be?
     
    drew68, Aug 25, 2006 IP
  7. ahkip

    ahkip Prominent Member

    Messages:
    9,205
    Likes Received:
    647
    Best Answers:
    0
    Trophy Points:
    310
    #7
    try fill up the form and see if you receive a email...i think it die in the mail fuctioni
     
    ahkip, Aug 25, 2006 IP
  8. drew68

    drew68 Well-Known Member

    Messages:
    582
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    128
    #8
    i didn't build this form my programmer did and placed it in his server...he's back east now and can't be reachable...so i don't know where in that form i could put my email address to test..it's not on the actual send_preview.html page i don't think...

    this is on that send_preview.html page...the function for the form...

    <FORM action=http://client.kujitech.com/writerlearning/sendmail.php method=post>

    that's all there is..shouldn't there be a redirect or something there as well?
     
    drew68, Aug 25, 2006 IP
  9. drew68

    drew68 Well-Known Member

    Messages:
    582
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    128
    #9
    does anyone have an idea? as my form is still broken..thanks
     
    drew68, Aug 25, 2006 IP