Monday 3 September 2018

daerPHP Mailer does not issue 'field entry'

The problem I am facing is this: - the PHP script (handled by PHP mailer) is sending an e-mail, but not the information people fill in at the form.
Here is the php script I use:
<?php
$to = "user@domain.com";
$subject = "Request";
$message = "<h1>Request</h1>";
$message .= "<strong>street</strong>: $_POST['street']";
$message .= "<strong>store</strong>: $_POST['store']";
$headers  = "From: request@domain.com";
$headers .= "MIME-Version: 1.0\r\n";
$headers .= "Content-type: text/html\r\n";
$sent = mail($to, $subject, $message, $headers);
if( $sent = mail($to, $subject, $message, $headers) ){ echo "SENT"; } else { echo "There
was a problem"; }
?>

Thanks in advance!

<?php
$to = "user@domain.com";
$subject = "Request";
$message = "<h1>Request</h1>";
$message .= "<strong>street</strong>:".$_POST['street'];
$message .= "<strong>store</strong>:".$_POST['store'];
$headers  = "From: request@domain.com";
$headers .= "MIME-Version: 1.0\r\n";
$headers .= "Content-type: text/html\r\n";
$sent = mail($to, $subject, $message, $headers);
if( $sent = mail($to, $subject, $message, $headers) ){ echo "SENT"; } else { echo "There
was a problem"; }
?>

0 comments:

Post a Comment