9 Replies Latest reply on Jan 24, 2008 5:30 AM by mkayyali

    PHP contact form

    mkayyali
      Dear All,

      im trying to build a contact form to send the user data to my mail as this topic ( http://www.kirupa.com/web/php_contact_form.htm )

      any way i tried many times and many forms from many site and by flash and by html and noo wayy its never send

      by the way , my server is support php 5.1.6 ( http://www.mkayyali.com/php/info.php ) and i tried to give a chmod access to my php and html files by make it 777 and also no way , i need to know what is the problem

      link to my contact page ( as kirupa topic ) : ( http://www.mkayyali.com/contact.html )

      Thanks a lot

        • 1. Re: PHP contact form
          Level 7
          mkayyali wrote:
          > Dear All,
          >
          > im trying to build a contact form to send the user data to my mail as this
          > topic ( http://www.kirupa.com/web/php_contact_form.htm )
          >
          > any way i tried many times and many forms from many site and by flash and by
          > html and noo wayy its never send
          >
          > by the way , my server is support php 5.1.6 (
          > http://www.mkayyali.com/php/info.php ) and i tried to give a chmod access to my
          > php and html files by make it 777 and also no way , i need to know what is the
          > problem

          You will be better off talking to your server admin. He will be able to tell you
          exactly what the problem is. Sometimes there are no permissions to do some things,
          regardless your made settings. It's to prevent inexperience users from messing around.


          --
          Best Regards

          Urami


          --
          "Never play Leap-Frog with a Unicorn."


          <urami>
          If you want to mail me - DO NOT LAUGH AT MY ADDRESS
          </urami>
          • 2. Re: PHP contact form
            E.S.D.
            Are you looking for the PHP scripting?
            • 3. Re: PHP contact form
              mkayyali Level 1
              no i have the script but its never send any thing ,

              script >

              <?php
              if(isset($_POST['submit'])) {
              $to = "you@you.com";
              $subject = "Form Tutorial";
              $name_field = $_POST['name'];
              $email_field = $_POST['email'];
              $message = $_POST['message'];

              $body = "From: $name_field\n E-Mail: $email_field\n Message:\n $message";

              echo "Data has been submitted to $to!";
              mail($to, $subject, $body);
              } else {
              echo "blarg!";
              }
              ?>
              • 4. Re: PHP contact form
                E.S.D. Level 1
                I have a script which works 100% ... if this doesnt work then there is something else wrong. Goodluck!

                <?php

                $name = $HTTP_POST_VARS['name'];
                $email = $HTTP_POST_VARS['email'];
                $message = $HTTP_POST_VARS['message'];

                $message = stripslashes($message);

                $sendTo = "me@mymail.com";
                $subject = "Email form Website";

                $msg_body = "Name: $name\n";
                $msg_body .= "E-Mail: $email\n";
                $msg_body .= "Comments: $message\n";

                $header_info = "From: ".$name." <".$email.">";

                mail($sendTo, $subject, $msg_body, $header_info);

                ?>
                • 5. Re: PHP contact form
                  mkayyali Level 1
                  :( its not work also e.s.d
                  • 6. Re: PHP contact form
                    E.S.D. Level 1
                    Think there might be something wrong with your text fields ... are you receiving any mail at all? What is your scripting on your send button?
                    • 7. Re: PHP contact form
                      mkayyali Level 1
                      its never send any thing

                      html >
                      <form method="POST" action="mailer.php">
                      <input type="text" name="name" size="19"><br>
                      <br>
                      <input type="text" name="email" size="19"><br>
                      <br>
                      <textarea rows="9" name="message" cols="30"></textarea>
                      <br>
                      <br>
                      <input type="submit" value="Submit" name="submit">
                      </form>
                      • 8. Re: PHP contact form
                        E.S.D. Level 1
                        I think I might know what is causing it ... check if your input text fields are not set to "Auto Kern". Untick the box Auto Kern in the properties panel.

                        If this does not work then there is conflict with your text paths.
                        • 9. Re: PHP contact form
                          mkayyali Level 1
                          nop , do u think that i have to ask my server admin ??