Contact form is not showing headers

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Contact form is not showing headers

    I have a contact form in my site...when i send message through it the headers are not displayed...rest everything is displayed.and i want to set required field for email and address and show error message when not filled out...please give some idea i am new to it
    Attached Files
    Last edited by Sumeeth6666; 21.11.13, 12:06.

    #2
    I would try adding:
    PHP Code:
    $headers .= 'X-Mailer: PHP/' phpversion(); 
    to your existing headers

    Comment


      #3
      Originally posted by something else View Post
      I would try adding:
      PHP Code:
      $headers .= 'X-Mailer: PHP/' phpversion(); 
      to your existing headers
      that isnt working...

      Added after 29 minutes:

      Can you please give me a contact form that has required fields and secure...
      Last edited by Sumeeth6666; 21.11.13, 16:43.

      Comment


        #4
        Form:

        PHP Code:
        echo '<input type="text" name="your_email" value="' $youremail '"/>'
        Check:

        PHP Code:
        $your_email = !empty($_POST['your_email']) ? $_POST['your_email'] : null;
        if (isset(
        $your_email)) {
        // continue..

        <!DOCTYPE html PUBLIC "-//WAPFORUM.RS

        Comment


          #5
          Originally posted by arnage View Post
          Form:

          PHP Code:
          echo '<input type="text" name="your_email" value="' $youremail '"/>'
          Check:

          PHP Code:
          $your_email = !empty($_POST['your_email']) ? $_POST['your_email'] : null;
          if (isset(
          $your_email)) {
          // continue..

          and where can i put error message to be displayed

          Comment


            #6
            This is an example, you will had to see this structure how it actually works...

            PHP Code:
            if (isset($your_email)) { 
            // continue.. 
            } else {

            // 1.
            echo 'No e-mail';

            // 2.
            $error 'No e-mail';


            <!DOCTYPE html PUBLIC "-//WAPFORUM.RS

            Comment


              #7
              Try turning on php error messages to see if the headers parameter has been disabled by the host.

              Comment

              Working...
              X