Jump to content

PHP mail function problem


million7m

Recommended Posts

I am trying to use the PHP mail function to repopulate the information that has been filled out on a form and send the form out in an html email the same way that it looked when the individual filled it out.  The problem I am having is with the Radio buttons and repopulating them.

 

<?php

 

header("location: http://localhost/expandex2.php");

 

$to = "[email protected]";

 

$subject = $_REQUEST['nselect'] . "'s Shift Log & Report for " . $_REQUEST['fselect'] . " on " . $_REQUEST['date'];

 

$headers .= "MIME-Version: 1.0" . "\r\n";

 

$headers .= "Content-type: text/html; charset=iso-8859-1" . "\r\n";

$body =

'<html>

<body>

<center><strong>

<font size="6">

SHIFT ACTIVITY LOG

</font>

<br><br>

</strong></center>

<b>

DATE: <input readonly="true" type="text" value='.$_REQUEST[date].'></input>

<br><br>

REPORTING SHIFT:

<select>

<option>'. $_REQUEST[fselect].'</option>

 

</select>

 

<br><br>

 

NAME:

<select>

<option>'. $_REQUEST[nselect].'</option>

 

</select>

<br><br>

</b>

 

<strong>

STATEMENT OF PURPOSE:

</strong>

<br>

The purpose of a shift activity log is twofold.  Firstly, the shift activity

log shows that you are actively performing required tasks needed to perpetuate

a successful help desk environment.  Secondly, CIO management, which is

not physically present during the third shift, needs to be informed of any

occurrences ongoing, or resolved, that began during your shift.  Please

familiarize your self with the shift activity log.  This log should be filled

out in as much detail as possible for every shift that you are responsible

for.  At the end of the shift, a fully completed shift activity log should

be saved on the K: drive.  Thank you for your continued hard work and

attention to this very important communication tool. 

<br><br>

<b>

CHECK E-MAIL

</b>

<br>

You should proxy into the CIO Help Desk account periodically throughout your shift; please

indicate the times that you access the CIO Help Desk account to monitor for emergency

troubles or requests.  You should also be mindful of any email that has

been distributed to your personal email account.  Your personal email

account is the primary communication point between CIO management and the

rotating staff.  Please complete the form below to verify that you have

checked any pertinent incoming email to your personal account.

<br><br>

 

<table class="MsoNormalTable" style="width: 74%;" border="1" cellpadding="0" width="54%">

<tbody><tr>

<td width="80%"><font color="red">

<b>

I have read my personal email today:

</b>

</font>

</td>

<td align="center">

YES<input type="radio" <?php if($_POST['email']=='yes'){echo 'checked';}?>

</td>

<td align="center">

NO<input type="radio" >

</td>

 

</tr>

</table>

<br><br></body></html>';

$from = "FROM: Fred Flintstone <[email protected]>";

mail($to, $subject, $body, $from);

 

if(mail($to, $subject, $body, "$headers \r\n From: $from"))

  echo "Mail sent";

else

  echo "Mail send failure - message not sent";

 

?>

Link to comment
https://forums.phpfreaks.com/topic/56336-php-mail-function-problem/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.