Jump to content

Dark Knight

Members
  • Content Count

    96
  • Joined

  • Last visited

Everything posted by Dark Knight

  1. Dark Knight

    Form

    Have you tried yourself? I tried myself on my server, but no result. I still don't receive any email. Believe me, it's frustrating to re-write the code, again, again and again. I think I've uploaded the page on the sever, at least 50 times since yesterday.
  2. Dark Knight

    Form

    I give up. I just wanted my 'first' and 'last' names be seen in my E-mail. All this work for nothing.
  3. Dark Knight

    Form

    Yes, I've forget a semicolon. I've added and the array(0) is again displayed above the form. Still, no email received.
  4. Dark Knight

    Form

    Yes I'm using my own email address.About the var thing, I'm getting a error Parse error: syntax error, unexpected T_IF on line 5
  5. Dark Knight

    Form

    You mean like this? <?php var_dump
  6. Dark Knight

    Form

    <html><body><?phpif (isset($_POST['email']))//if "email" is filled out, send email { //send email $to = "mymail@yahoo.com"; $email = $_POST['email']; $subject = $_POST['subject']; $message = "<u>From:</u> " . $_POST['first'] . " " . $_POST['last'] . "<br />" . "<u>Message:</u> " . $_POST['message']; mail( $to, "Subject: $subject", $message, "From: $email"); echo "<br /><br />Thank you for using our mail form"; }else//if "email" is not filled out, display the form { echo "<form method='post' action='index.php'> First Nam
  7. Dark Knight

    Form

    SMTP = localhost
  8. Dark Knight

    Form

    It has because I've tested a long time ago. I can ensure you.Okei, I've add this and on my page I see some tables. What should I check?
  9. Dark Knight

    Form

    Sorry people, I'm confused. I've tried to add phpinfo() right after <?php but when the page loads, I'm getting a error on line 5. It just takes to much to ask to get to the bottom of the problem?
  10. Dark Knight

    Form

    I'm testing it on a server, not on local. I've tried the code written by chokk, but now I don't receive any mail.
  11. Dark Knight

    Form

    I'm getting the same problem with "array". I think the problem is with the "var_dump($_POST);" because when I submit it shows:array(5) { ["first"]=> string(13) "my first name" ["last"]=> string(12) "my last name" ["email"]=> string(17) "myemail@yahoo.com" ["subject"]=> string(12) "just testing" ["message"]=> string(21) "this is a simple test" } Thank you for using our mail formAnd in the form (before submitting it), it shows array(0) { }
  12. Dark Knight

    Form

    none. I get the same array(0) {}
  13. Dark Knight

    Form

    The same answer above.
  14. Dark Knight

    Form

    Yes. I don't receive any email.
  15. Dark Knight

    Form

    I know that. I was the same I had previous. The problem is I have array(0) { } above the form. And when I submit it will show me array(5) { ["first"]=> string(13) "my first name" ["last"]=> string(11) "my last nam" ["email"]=> string(24) "myemailaddress@yahoo,com" ["subject"]=> string(12) "just testing" ["message"]=> string(14) "this is a test" } Thank you for using our mail form
  16. Dark Knight

    Form

    I've tried that already but no result.
  17. Dark Knight

    Form

    $_REQUEST is used when the email adress field is added. If the e-mail is not in the field, then the form will not be send.
  18. Dark Knight

    Form

    Well I'm getting this array(0) { } above the form.
  19. Dark Knight

    Form

    Oups, I added $_REQUEST instead of $_POST
  20. Dark Knight

    Form

    <?php var_dump($_REQUEST);if (isset($_REQUEST['email']))//if "email" is filled out, send email { //send email $to = 'mymail@yahoo.com'; $email = $_REQUEST['email']; $subject = $_REQUEST['subject']; $message = 'Name: '.$_REQUEST['first'].' '.$_REQUEST['last'].'<br>'; $message .= $_REQUEST['message'];; mail( $to, "Subject: $subject", $message, "From: $email"); echo "Thank you for using our mail form"; }else//if "email" is not filled out, display the form { echo "<form method='post' action='index.php'> First Name: <input name='first' type='text' /><br />
  21. Dark Knight

    Form

    No result. the text that says the mail was received is replaced with an error. Any other suggestions?
  22. Dark Knight

    Form

    If I write $_REQUEST instead, will work? And remove the <br> tag as well.
  23. Dark Knight

    Form

    Well it doesn't work. The message will look like this: Name: <br>Just testing...Where "Just testing" is the message of the mail. So the first and last name dosen't appear.
  24. Dark Knight

    Form

    I've seen a code from the php tutorial to send a form by email. I've customized it but I have a problem. I can't receive the First Name and Last Name from someone who will send me a message.Here is the code <html><body><?phpif (isset($_REQUEST['email']))//if "email" is filled out, send email { //send email $to = $_REQUEST['mymailaddress@yahoo.com'] $email = $_REQUEST['email']; $subject = $_REQUEST['subject']; $message = $_REQUEST['message']; mail( $to, "Subject: $subject", $message, "From: $email"); echo "Thank you for using our mail form"; }else//if "email" is not fil
  25. Dark Knight

    Form

    Oh, yeah! Now I understand why my PHP code was not in the Code Source of the page. It makes sense now. Thank you!
×
×
  • Create New...