GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   Contact Form Help Needed Please (https://gfy.com/showthread.php?t=1062842)

Webmaster Advertising 03-29-2012 11:52 AM

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 03-29-2012 01:48 PM

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.

Webmaster Advertising 03-29-2012 02:20 PM

Thank you kindly Sir, I knew it had to be something simple, much appreciated :)


All times are GMT -7. The time now is 10:17 PM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123