1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Contact us form code help

Discussion in 'CSS' started by Waqar Rasheed, Jul 2, 2014.

  1. #1
    Hi every one. This is my portfolio
    www.zeropixels.net
    When someone send me message using contact us form. I didn't get email but I receive only his/her name and message.
    can anyone help me to fix this issue?
    Thanks and best regards,
    -waqar

     
    Waqar Rasheed, Jul 2, 2014 IP
  2. kk5st

    kk5st Prominent Member

    Messages:
    3,497
    Likes Received:
    376
    Best Answers:
    29
    Trophy Points:
    335
    #2
    This is not a css issue. Your email-done.php script is likely at fault.

    There is a sub forum for php issues.

    cheers,

    gary
     
    kk5st, Jul 2, 2014 IP
  3. Waqar Rasheed

    Waqar Rasheed Active Member

    Messages:
    21
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    56
    #3
    How can I fix this issue? Can you help me?
     
    Waqar Rasheed, Jul 2, 2014 IP
  4. shemseddine

    shemseddine Active Member

    Messages:
    144
    Likes Received:
    4
    Best Answers:
    3
    Trophy Points:
    55
    #4
    on the script that handles the sending, check that the name used there and the name in the form are the same.
     
    shemseddine, Jul 2, 2014 IP
  5. pentaxial

    pentaxial Active Member

    Messages:
    101
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    78
    #5
    HI,

    Share your "email-done.php" code, so we can fix here

    Thanks
     
    pentaxial, Jul 2, 2014 IP
  6. Waqar Rasheed

    Waqar Rasheed Active Member

    Messages:
    21
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    56
    #6
    You can see result of email
    prntscr.com/3zyei1

    here is code of email-done.php

    <?php

    $name = $_POST['message'];
    $email = $_POST['name'];
    $howufind = $_POST['email'];

    $surferip = $_SERVER['REMOTE_ADDR'];
    $time = date('l F d, Y, h:i A', strtotime('+10 hours'));



    $message = "<table width='100%' border='0' cellpadding='0' cellspacing='0'>
    <tr>
    <td><table width='99%' border='0' cellpadding='0' cellspacing='0'>
    <tr>
    <td><font face='Arial' color='#666666' size='3'><strong>&nbsp;CONTACT US</strong></font></td>
    <td align='right'><font face='Arial' color='#E32235' size='1'><strong>***** This is an auto generated notification for Contact Us form completion. *****</strong></font></td>
    </tr>
    </table></td>
    </tr>
    <tr>
    <td><table width='100%' border='0' cellpadding='0' cellspacing='0'>
    <tr>
    <td bgcolor='#666666' height='25'><font face='Arial' color='#FFFFFF' size='2'><strong>&nbsp;Personal &amp; Project Information:</strong></font></td>
    </tr>
    <tr>
    <td><table width='100%' border='1' bordercolor='black' cellpadding='5' cellspacing='1'>
    <tr>
    <td width='150'><font face='Arial' color='black' size='2'>Message :</font></td>
    <td><font face='Arial' color='black' size='2'>" . $message . "</font></td>
    </tr>
    <tr>
    <td><font face='Arial' color='black' size='2'>Name :</font></td>
    <td><font face='Arial' color='black' size='2'>" . $name . "</font></td>
    </tr>
    <tr>
    <td><font face='Arial' color='black' size='2'>Email :</font></td>
    <td><font face='Arial' color='black' size='2'>" . $email . "</font></td>
    </tr>
    </table></td>
    </tr>
    </table></td>
    </tr>
    </table>
    <br><br><table width='100%' border='0' cellpadding='0' cellspacing='0'>
    <tr>
    <td><table width='100%' border='0' cellpadding='0' cellspacing='0'>
    <tr>
    <td bgcolor='#e32235' height='25'><font face='Arial' color='#FFFFFF' size='2'><strong>&nbsp;Visitor Tracking Details:</strong></font></td>
    </tr>
    <tr>
    <td><table width='100%' border='1' bordercolor='black' cellpadding='5' cellspacing='1'>
    <tr>
    <td width='150'><font face='Arial' color='#666666' size='2'>IP Address :</font></td>
    <td><font face='Arial' color='#666666' size='2'>" . $surferip . "</font></td>
    </tr>
    <tr>
    <td><font face='Arial' color='#666666' size='2'>Date &amp; Time :</font></td>
    <td><font face='Arial' color='#666666' size='2'>" . $time . "</font></td>
    </tr>
    <tr>
    </table></td>
    </tr>
    </table></td>
    </tr>
    </table>";

    $to = "";
    $subject = "CONTACT US SUBMITTED";

    $headers = 'MIME-Version: 1.0' . "\r\n";
    $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
    $headers .= "From: " . $name . " <" . $email . ">" . "\r\n" .
    'X-Mailer: PHP/' . phpversion();

    mail($to, $subject, $message, $headers);

    ?>
     
    Waqar Rasheed, Jul 6, 2014 IP
  7. Waqar Rasheed

    Waqar Rasheed Active Member

    Messages:
    21
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    56
    #7
    any one plz fix my problem
     
    Waqar Rasheed, Jul 7, 2014 IP
  8. shemseddine

    shemseddine Active Member

    Messages:
    144
    Likes Received:
    4
    Best Answers:
    3
    Trophy Points:
    55
    #8
    you named the messages as $name. you can either rename it or just use
    mail($to, $subject, $name, $headers);
    Code (markup):
    also email you called it howufind and name you called email
     
    shemseddine, Jul 7, 2014 IP
  9. Waqar Rasheed

    Waqar Rasheed Active Member

    Messages:
    21
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    56
    #9
    Can you please edit my php code? so I will upload and check its working or not.
     
    Waqar Rasheed, Jul 7, 2014 IP
  10. shemseddine

    shemseddine Active Member

    Messages:
    144
    Likes Received:
    4
    Best Answers:
    3
    Trophy Points:
    55
    #10
    <?php
    
    $message= $_POST['message'];
    $name= $_POST['name'];
    $email= $_POST['email'];
    
    $surferip = $_SERVER['REMOTE_ADDR'];
    $time = date('l F d, Y, h:i A', strtotime('+10 hours'));
    
    
    
    $message = "<table width='100%' border='0' cellpadding='0' cellspacing='0'>
    <tr>
    <td><table width='99%' border='0' cellpadding='0' cellspacing='0'>
    <tr>
    <td><font face='Arial' color='#666666' size='3'><strong>&nbsp;CONTACT US</strong></font></td>
    <td align='right'><font face='Arial' color='#E32235' size='1'><strong>***** This is an auto generated notification for Contact Us form completion. *****</strong></font></td>
    </tr>
    </table></td>
    </tr>
    <tr>
    <td><table width='100%' border='0' cellpadding='0' cellspacing='0'>
    <tr>
    <td bgcolor='#666666' height='25'><font face='Arial' color='#FFFFFF' size='2'><strong>&nbsp;Personal &amp; Project Information:</strong></font></td>
    </tr>
    <tr>
    <td><table width='100%' border='1' bordercolor='black' cellpadding='5' cellspacing='1'>
    <tr>
    <td width='150'><font face='Arial' color='black' size='2'>Message :</font></td>
    <td><font face='Arial' color='black' size='2'>" . $message . "</font></td>
    </tr>
    <tr>
    <td><font face='Arial' color='black' size='2'>Name :</font></td>
    <td><font face='Arial' color='black' size='2'>" . $name . "</font></td>
    </tr>
    <tr>
    <td><font face='Arial' color='black' size='2'>Email :</font></td>
    <td><font face='Arial' color='black' size='2'>" . $email . "</font></td>
    </tr>
    </table></td>
    </tr>
    </table></td>
    </tr>
    </table>
    <br><br><table width='100%' border='0' cellpadding='0' cellspacing='0'>
    <tr>
    <td><table width='100%' border='0' cellpadding='0' cellspacing='0'>
    <tr>
    <td bgcolor='#e32235' height='25'><font face='Arial' color='#FFFFFF' size='2'><strong>&nbsp;Visitor Tracking Details:</strong></font></td>
    </tr>
    <tr>
    <td><table width='100%' border='1' bordercolor='black' cellpadding='5' cellspacing='1'>
    <tr>
    <td width='150'><font face='Arial' color='#666666' size='2'>IP Address :</font></td>
    <td><font face='Arial' color='#666666' size='2'>" . $surferip . "</font></td>
    </tr>
    <tr>
    <td><font face='Arial' color='#666666' size='2'>Date &amp; Time :</font></td>
    <td><font face='Arial' color='#666666' size='2'>" . $time . "</font></td>
    </tr>
    <tr>
    </table></td>
    </tr>
    </table></td>
    </tr>
    </table>";
    
    $to = "waqarrasheed1990@gmail.com";
    $subject = "CONTACT US SUBMITTED";
    
    $headers = 'MIME-Version: 1.0' . "\r\n";
    $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
    $headers .= "From: " . $name . " <" . $email . ">" . "\r\n" .
    'X-Mailer: PHP/' . phpversion();
    
    mail($to, $subject, $message, $headers);
    
    ?>
    Code (markup):
    This should work even though I just skimmed through it
     
    shemseddine, Jul 7, 2014 IP
  11. Waqar Rasheed

    Waqar Rasheed Active Member

    Messages:
    21
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    56
    #11
    I receive blank email after using this php code.
    see here.
    http://prntscr.com/408bpx

    please checkout my index file form code

    <div class="contact-form">
    <form name="contact" method="post" action="email-done.php">
    <textarea name="message" placeholder="Insert your message here:"></textarea>
    <input name="name" type="text" placeholder="Your Name:" />
    <input name="email" type="text" placeholder="Your Email:" />
    <input id="submit" type="submit" value="SUBMIT" onclick="return Validate();" />
    </form>
     
    Waqar Rasheed, Jul 7, 2014 IP
  12. pentaxial

    pentaxial Active Member

    Messages:
    101
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    78
    #12
    hi,

    Do you still need a solution? , Thanks
     
    pentaxial, Jul 9, 2014 IP
  13. Waqar Rasheed

    Waqar Rasheed Active Member

    Messages:
    21
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    56
    #13
    My problem is solved now.
    My friend make this code working.
     
    Waqar Rasheed, Jul 12, 2014 IP