Activity Stream
48,167 MEMBERS
6965 ONLINE
besthostingforums On YouTube Subscribe to our Newsletter besthostingforums On Twitter besthostingforums On Facebook besthostingforums On facebook groups

Results 1 to 7 of 7
  1.     
    #1
    Member
    Website's:
    cb-gfx.com

    Question [PHP] Getting blank message from contact form

    heyy

    i m receiving blank message on my email from contact form of some site.

    html content:

    Code: 
    <!-- contact form start -->
              <div class="contactForm" id="contactForm">
                <form id="contact">
                  <fieldset>
                    <label for="contactName" id="name_label">Name (required)</label>
                    <input type="text" name="contactName" id="contactName" size="30" value="" class="text-input" />
                    <label for="contactEmail" id="email_label">Email (required)</label>
                    <input type="text" name="contactEmail" id="contactEmail" size="30" value="" class="text-input" />
                    <label for="contactSubject" id="subject_label">Subject</label>
                    <input type="text" name="contactSubject" id="contactSubject" size="30" value="" class="text-input" />
                    <label for="contactMessage" id="message_label">Message (required)</label>
                    <textarea  name="contactMessage" id="contactMessage" class="text-input"></textarea>
                    <p>
                      <input type="submit" name="submitMessage" class="contactButton" id="contactSubmitBtn" value=""/>
                    </p>
                  </fieldset>
                </form>
              </div>
              <!-- contact form end -->


    mail.php content:

    Code: 
    <?php
    if (isset($_POST['email']))
    //if "email" is filled out, send email
      {
      //send email
      $email = $_POST['email'] ;
    $name = $_POST['name'] ;
      $subject = $_POST['subject'] ;
      $contactMessage = $_POST['contactMessage'] ;
    $header = '';
    $header .= "Reply-To: $name <$email>\r\n"; 
        $header .= "Return-Path: $name <$email>\r\n"; 
        $header .= "From: $name <admin@cb-gfx.com>\r\n"; 
        $header .= "Organization: CB-Graphics\r\n"; 
        $header .= "Content-Type: text/plain\r\n"; 
      mail("divyap_31@yahoo.com", $subject,
      $contactMessage, $header);
      echo "Thank you for using our mail form";
      }
    else
    //if "email" is not filled out, display the form
      {
      echo "<form method='post' action='mailform.php'>
      Email: <input name='email' type='text' /><br />
      Subject: <input name='subject' type='text' /><br />
      contactMessage:<br />
      <textarea name='contactMessage' rows='15' cols='40'>
      </textarea><br />
      <input type='submit' />
      </form>";
      }
      
      
      
      ?>

    Plz help me to fix this!

    THanks!
    coolboyz2323 Reviewed by coolboyz2323 on . [PHP] Getting blank message from contact form heyy i m receiving blank message on my email from contact form of some site. html content: <!-- contact form start --> <div class="contactForm" id="contactForm"> <form id="contact"> <fieldset> Rating: 5

    My KWWH Graphics Thread!
    Respected - Hawk, Capone, Mindy, Humour, Sp32, Sushant, xTreme, Joomlaz, Pankaj, rko

  2.   Sponsored Links

  3.     
    #2
    Member
    Did your setup your server for mail to work
    You will need a mail cilent
    Helping people is my hobby.....
    Learn how to secure your server against ddos

  4.     
    #3
    Member
    Website's:
    cb-gfx.com
    Quote Originally Posted by Ifirst View Post
    Did your setup your server for mail to work
    You will need a mail cilent
    actually this other site is on same hosting where my cb-gfx.com is up, & contact form of cb-gfx.com works very fine so i guess it shud also work ?

    Thanks!

    ---------- Post added at 06:37 PM ---------- Previous post was at 06:34 PM ----------

    is above coding is 100% ok?

    My KWWH Graphics Thread!
    Respected - Hawk, Capone, Mindy, Humour, Sp32, Sushant, xTreme, Joomlaz, Pankaj, rko

  5.     
    #4
    Member
    PHP Code: 
    <?php
    if (isset($_POST['contactEmail']))
        {
        
    $email $_POST['contactEmail'] ;
        
    $name $_POST['contactName'] ;
        
    $subject $_POST['contactSubject'] ;
        
    $contactMessage $_POST['contactMessage'] ;
        
    $header  "Reply-To: $name <$email>\r\n"
        
    $header .= "Return-Path: $name <$email>\r\n"
        
    $header .= "From: $name <admin@cb-gfx.com>\r\n"
        
    $header .= "Organization: CB-Graphics\r\n"
        
    $header .= "Content-Type: text/plain\r\n"
        
    mail("divyap_31@yahoo.com"$subject$contactMessage$header);
        echo 
    "Thank you for using our mail form";
        }
    else
        {
        echo 
    "<form method='post' action='mailform.php'>
        Email: <input name='contactEmail' type='text' /><br />
        Subject: <input name='contactSubject' type='text' /><br />
        contactMessage:<br />
        <textarea name='contactMessage' rows='15' cols='40'>
        </textarea><br />
        <input type='submit' />
        </form>"
    ;
        }
    ?>

    You should add form validation

  6.     
    #5
    Member
    Website's:
    cb-gfx.com
    Quote Originally Posted by Gavo View Post
    PHP Code: 
    <?php
    if (isset($_POST['contactEmail']))
        {
        
    $email $_POST['contactEmail'] ;
        
    $name $_POST['contactName'] ;
        
    $subject $_POST['contactSubject'] ;
        
    $contactMessage $_POST['contactMessage'] ;
        
    $header  "Reply-To: $name <$email>\r\n"
        
    $header .= "Return-Path: $name <$email>\r\n"
        
    $header .= "From: $name <admin@cb-gfx.com>\r\n"
        
    $header .= "Organization: CB-Graphics\r\n"
        
    $header .= "Content-Type: text/plain\r\n"
        
    mail("divyap_31@yahoo.com"$subject$contactMessage$header);
        echo 
    "Thank you for using our mail form";
        }
    else
        {
        echo 
    "<form method='post' action='mailform.php'>
        Email: <input name='contactEmail' type='text' /><br />
        Subject: <input name='contactSubject' type='text' /><br />
        contactMessage:<br />
        <textarea name='contactMessage' rows='15' cols='40'>
        </textarea><br />
        <input type='submit' />
        </form>"
    ;
        }
    ?>

    You should add form validation
    & how to do that bro?

    i wish it was possible to do that in illustator

    plz help! Thanks!

    My KWWH Graphics Thread!
    Respected - Hawk, Capone, Mindy, Humour, Sp32, Sushant, xTreme, Joomlaz, Pankaj, rko

  7.     
    #6
    Member
    You should be able to to quite easy integrate recapcha . Check their wiki. On phone otherwise would do it for you

  8.     
    #7
    Member
    Website's:
    cb-gfx.com
    Quote Originally Posted by Phogo View Post
    You should be able to to quite easy integrate recapcha . Check their wiki. On phone otherwise would do it for you
    You can do it when @ Home! no huriez!

    THanks a lot!

    ---------- Post added 30th Sep 2012 at 08:03 AM ---------- Previous post was 29th Sep 2012 at 07:35 PM ----------

    FixEd!!!! Thanks everyone

    My KWWH Graphics Thread!
    Respected - Hawk, Capone, Mindy, Humour, Sp32, Sushant, xTreme, Joomlaz, Pankaj, rko

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Contact form in PHP website gives errors
    By f4n3 in forum Web Development Area
    Replies: 2
    Last Post: 3rd May 2012, 03:42 PM
  2. Where can I found a good contact form?
    By Divvy in forum Webmaster Discussion
    Replies: 9
    Last Post: 31st Mar 2011, 06:00 PM
  3. 23:34 10/11/2010 - Contact form
    By JmZ in forum Web Development Area
    Replies: 4
    Last Post: 12th Nov 2010, 11:53 AM
  4. Free Contact Form Lite
    By Jesse in forum Useful Sites
    Replies: 1
    Last Post: 30th Dec 2009, 08:50 PM
  5. Free Contact Form
    By johnny in forum Webmaster Discussion
    Replies: 1
    Last Post: 2nd Dec 2009, 03:35 PM

Tags for this Thread

BE SOCIAL