Page 1 of 2 12 LastLast
Results 1 to 15 of 18

Thread: Form question

  1. #1
    Join Date
    Apr 2004
    Location
    Ontario
    Posts
    141

    Form question

    I have made a form but I dont know how to make it email me the information. Can someone help me?

    www.s93629411.onlinehome.us/FE/booking.html

  2. #2
    Join Date
    Apr 2004
    Location
    Ontario
    Posts
    141
    ok, I got it wroking more or less but i am getting a parse error. Dammit

  3. #3
    Join Date
    Apr 2004
    Location
    Ontario
    Posts
    141
    Does anyone know why it isnt working or can some one post me one that works. I am very very new to PHP.

    Edit[] Edit worked for the first time. The mailer worked once out of the like 15 times i tried it.
    Last edited by P10n33R; 04-19-2004 at 11:20 PM.

  4. #4
    Join Date
    Jul 2003
    Location
    Kuwait
    Posts
    5,099
    Without showing us the code, we can't help you

    Paste the code here (use the php formatting tags if you want it highlighted).
    In order to understand recursion, one must first understand recursion.
    If you feel like it, you can read my blog
    Signal > Noise

  5. #5
    Join Date
    Apr 2004
    Location
    Nijmegen, Netherlands
    Posts
    38
    Does it work already??

    www.magiceyes.nl

  6. #6
    Join Date
    Apr 2004
    Location
    Ontario
    Posts
    141
    PHP Code:
    <form method="post" action="action.php"
            <
    input type="hidden" name="required" value="email,realname">

            <
    table cellpadding="0" cellspacing="0" border="0" align=center>
                <
    tr class="style3"><td colspan=2 align=center><class="style1">Booking
                
    <class="style7"></td></tr>
                <
    tr class="style6">
                  <
    td><div align="right"><span class="style2">Your  E-Mail:</span></div></td>
                  <
    td><input name="email" type="Text" size=30></td></tr>
                <
    tr class="style6">
                  <
    td><div align="right"><span class="style2">Your Name:</span></div></td>
                  <
    td><input name="realname" type="Text" size=30></td></tr>
                                       <
    tr class="style6">
                  <
    td><div align="right"><span class="style2">Subject:</span></div></td>
                  <
    td><input name="subject" type="Text" size=30></td></tr>
                <
    tr class="style6"><td colspan=2>            <span class="style2">Message:</span><span class="style7"><br>
                    <
    textarea name=message cols=40 rows=10></textarea>
                </
    span>              <class="style7">
                </
    td></tr>
                <
    tr><td colspan=2 align=center><input type="submit" value="Submit" name="submit"></td></tr>
            </
    table
    action.php

    PHP Code:
    <?php
    $name 
    $_POST['name']; 
    $email $_POST['email'];
    $subject $_POST['subject'];
    $message $_POST['message']; 
    $my_email "mjyuke@bmts.com";
    $headers .= "From: $name <$email>\r\n"
    $headers .= "Content-Type: text/plain; charset=iso-8859-1\r\n"
    mail($my_email$subject$message$headers); 
    ?>

    Some code I put together using a few different scripts.

  7. #7
    Join Date
    Dec 2002
    Location
    NY, NY
    Posts
    3,975
    try this:
    Code:
     <?php 
    $name = $_POST['realname']; 
    $email = $_POST['email']; 
    $subject = $_POST['subject']; 
    $message = $_POST['message']; 
    $my_email = "mjyuke@bmts.com"; 
    $headers .= "From: $name <$email>\r\n"; 
    $headers .= "Content-Type: text/plain; charset=iso-8859-1\r\n"; 
    mail($my_email, $subject, $message, $headers); 
    ?>

  8. #8
    Join Date
    Apr 2004
    Location
    Ontario
    Posts
    141
    trying it as i type.

  9. #9
    Join Date
    Apr 2004
    Location
    Ontario
    Posts
    141
    Well that didn't work. Does anyone have one they know works that i can test?

  10. #10
    Join Date
    May 2003
    Posts
    598
    I just tested your code (unaltered) on my server and it worked fine 10/10 times. It's most likely a problem on your server's end. I can't really offer much more information then that (because I don't really know what it could be).

  11. #11
    Join Date
    May 2003
    Posts
    598
    Here's my support contact form code, it's a little hairy, but if you know what you're doing you should be able to source a working system.

    http://www.pixd.com/support.phps
    (view source if you don't see code, my server's a little wonky with phps files right now)

    Good Luck, it's all I can really offer ya.
    Last edited by pixd; 04-20-2004 at 08:55 PM.

  12. #12
    Join Date
    Dec 2003
    Location
    Pakistan
    Posts
    260
    Try this :

    <?php

    $realname = $HTTP_POST_VARS[realname];
    $email = $HTTP_POST_VARS[email];
    $subject = $HTTP_POST_VARS[subject];
    $message = $HTTP_POST_VARS[message];

    $msg = "Real Name:\t$realname\n";
    $msg .= "E-mail:\t$email\n";
    $msg .= "Message:\t$message\n";


    mail("you@urhost.com", "$subject", "$msg", "From: $realname<$email>");

    echo "<H1 align=center>Thank You, $realname</H1>";
    echo "<P align=center>We will contact you shortly</p>";


    ?>

    Pretty Script by me

  13. #13
    Join Date
    Jul 2003
    Location
    Kuwait
    Posts
    5,099
    If none of those suggestions work, try phpmailer.
    In order to understand recursion, one must first understand recursion.
    If you feel like it, you can read my blog
    Signal > Noise

  14. #14
    Join Date
    Apr 2004
    Location
    Ontario
    Posts
    141
    ok.

    I can get an email from almost any email address except for hotmail. does anyone know why? It is starting to piss me off.

  15. #15
    Join Date
    Nov 2002
    Location
    Finland
    Posts
    96
    I think Hotmail blocking emails sent by servers without Reverse DNS....

    Contact your host and ask about this...

Page 1 of 2 12 LastLast

Posting Permissions

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