Contact Form Help Needed Please

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Webmaster Advertising
    So Fucking Banned
    • Sep 2003
    • 1360

    #1

    Contact Form Help Needed Please

    Im trying out a new contact form to the one i typically use and im having some issues with it.

    This is the code i have in sendmail.php:

    Code:
    <?php
      $name = $_REQUEST['name'] ;
      $phone = $_REQUEST['phone'] ;
      $email = $_REQUEST['email'] ;
      $summary = $_REQUEST['summary'] ;
    
    
    $from = '[email protected]';
    $to      = '[email protected]';
    $subject = 'Pixel Square Designs';
    $message = "$name\n\r$phone\n\r$email\n\r$summary"; 
    
    $to = '[email protected]';
    $header = 'From: '.$from;
    
    mail($to, $subject, $summary, $header);
    
    header( "Location: submitted.php" );
    ?>
    You can find the form online on this page:

    http://www.pixelsquaredesigns.com/testimonials/

    Can anyone see why the form isnt sending out full information, all im getting is the 'comment' section of the actual form itself when hitting submit and confirming tos has been read :/

    Have been playing with this for about an hour now and its starting to get annoying

    Thanks for any help you can offer.
  • raymor
    Confirmed User
    • Oct 2002
    • 3745

    #2
    You're getting "$summary" because that's what you're passing to mail():

    mail( $to, $subject, $summary, $header);

    You intended to mail $message, so replace $summary with $message.

    You did right by hardcoding both $from and $to. If you had set either $from or $to as tjeir email address while allowing them to affect $message, it works be exploitable by spammers.
    For historical display only. This information is not current:
    support&#64;bettercgi.com ICQ 7208627
    Strongbox - The next generation in site security
    Throttlebox - The next generation in bandwidth control
    Clonebox - Backup and disaster recovery on steroids

    Comment

    • Webmaster Advertising
      So Fucking Banned
      • Sep 2003
      • 1360

      #3
      Thank you kindly Sir, I knew it had to be something simple, much appreciated

      Comment

      Working...