Hi -
I'm trying to work with some files that were created by someone else and I'm hoping to not have to start from scratch. There is an html (nominate.html) file that is a form with text fields, checkboxes and radio buttons; which upon submission points to a thank you page (thanks.php) which displays a webpage and also sends an email.
The problem I'm having is with the checkboxes information. I can't get it to display in the email message. Ultimately I'd like it to display any and all of the boxes that are checked.
Thanks!
nominate.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link href="main.css" rel="stylesheet" type="text/css">
<link href="footer.css" rel="stylesheet" type="text/css">
<link href="header.css" rel="stylesheet" type="text/css">
<link href="ask.css" rel="stylesheet" type="text/css">
</head>
<body>
<table width="100%" border="0" cellspacing="0" cellpadding="15">
<tr class="top">
<td colspan="3" valign="middle" class="dash"><!--#include virtual="header.txt" --></td>
</tr>
<tr>
<td valign="top" bgcolor="#FFFFFF">
<form action="thanks.php" method="post">
<fieldset>
<legend> Your Information </legend>
<p>
Your name:
<input name="nominator" type="text" size="75"/>
</p>
<p>
Your email:
<input name="email" type="text" size="75" />
</p>
<p>
Your department/unit:
<input name="dept" type="text" size="75" />
</p>
<p>
<label class="topalign">If other staff are helping with the nomination, list them here:</label>
<textarea name="others" cols="50" rows="3" wrap="hard"></textarea>
</p>
<p class="note"> </p>
</fieldset>
<p> </p>
<fieldset>
<legend><a></a> About the Nominee(s) </legend>
<p>
1. Name of individual or team you are nominating (please list individuals on team, if known):
</p>
<p>
<textarea name="nominee" cols="90" rows="3" wrap="hard"></textarea>
</p>
<p>
2. Describe your working relationship with the nominee(s):
</p>
<p>
<textarea name="relationship" cols="90" rows="3" wrap="hard"></textarea>
</p>
<p>
3. Choose the award category (you may select more than one):
</p>
<p class="note">[open <a href="about-im.html#criteria" target="blank">descriptions of awards</a> in a new tab/window]</p>
<p>
<input type="checkbox" name="category" value="innovation">
Innovation and Creativity<br>
<input type="checkbox" name="category" value="communication">
Communication and Collaboration<br>
<input type="checkbox" name="category" value="results">
Results, Outcome, and Productivity<br>
<input type="checkbox" name="category" value="community">
Community<br>
<input type="checkbox" name="category" value="unsung">
Unsung Hero</p>
<p>
4. Describe the nominee's contribution, and how, specifically, this work relates to the criteria and descriptions of each award:
</p>
<p>
<textarea name="nomination" cols="90" rows="10" wrap="hard"></textarea>
</p>
</p>
<p>
5. Was this contribution for a one-time activity or has this effort been continuous?
</p>
<p>
<input type="radio" name="continuous" value="one-time">
One-time
<br>
<input type="radio" name="continuous" value="continuous">
Continuous</p>
6. Notes, or other information:
</p>
<p>
<textarea name="notes" cols="100" rows="3" wrap="hard"></textarea>
</p>
</p>
</fieldset>
<h2>Choose one:</h2>
<p>
<input type="submit" value="SUBMIT NOMINATION" name="submit" >
This nomination is finished, send to the R+R Committee. </p>
<p>OR</p>
<p><INPUT name="notready" TYPE="submit" VALUE="Email to me" > I haven't finished this nomination, please email me what I have so far.
</p>
</form>
<p> </p> </td>
<td rowspan="2" valign="top" bgcolor="#FFFFFF">
<br />
<p> </p><p> </p></td>
</tr>
<tr>
<td valign="bottom" bgcolor="#FFFFFF"><p class="breadcrumb"><!--#config timefmt="%D" -->
This page was last updated on
<!--#echo var="LAST_MODIFIED" -->
</p></td>
</tr>
</table>
</body>
</html>
thanks.php
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Thanks: Infinite Mile Nomination: Rewards and Recognition: MIT Libraries</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link href="main.css" rel="stylesheet" type="text/css">
<link href="footer.css" rel="stylesheet" type="text/css">
<link href="header.css" rel="stylesheet" type="text/css">
<link href="ask.css" rel="stylesheet" type="text/css">
</head>
<body>
<table width="100%" border="0" cellspacing="0" cellpadding="15">
<tr class="top">
<td colspan="3" valign="middle" class="dash"><?php include("header.txt"); ?></td>
</tr>
<tr>
<td valign="top" bgcolor="#FFFFFF">
<p class="breadcrumb"> <a href="index.html">R+R Home</a> > <a href="im.html">IM Award Home</a></p>
<p> </p>
<?php
$submit = $_REQUEST['submit'];
function submit_nom()
{
$nominator = stripslashes($_REQUEST['nominator']);
$email = stripslashes($_REQUEST['email']);
$dept = stripslashes($_REQUEST['dept']);
$others = stripslashes($_REQUEST['others']);
$nominee = stripslashes($_REQUEST['nominee']);
$relationship = stripslashes($_REQUEST['relationship']);
$category = stripslashes($_REQUEST['category']);
$nomination = stripslashes($_REQUEST['nomination']);
$continuous = stripslashes($_REQUEST['continuous']);
$notes = stripslashes($_REQUEST['notes']);
$submit = $_REQUEST['submit'];echo "<strong>Thank you $nominator!</strong>\n<br><br>";
echo "Your nomination has been submitted to the Rewards and Recognition Committee and you also will receive a copy of the nomination via email.";
//Send email to Robin
$body = "Thank you for submitting an Infinite Mile Award nomination! Your nomination has been forwarded to the Rewards + Recognition Committee. If you have any questions, please contact rr-lib@mit.edu.
===================
Nominator: $nominator
Email: $email
Dept/Unit: $dept
Other staff: $others
Relationship: $relationship
Nominee: $nominee
Category: $category
Nomination: $nomination
Was this contribution for a one-time activity or has this effort been continuous? $continuous
Notes or other information: $notes";
$headers = "From: $email\r\n";
$headers .= "CC: $email\r\n";
mail ('rmdead@mit.edu', 'Infinite Mile nomination submitted', $body, $headers);
}
if($submit == "SUBMIT NOMINATION") {
submit_nom();
}
?>
<p> </p>
</td>
<td rowspan="2" valign="top" bgcolor="#FFFFFF">
<br />
<p> </p></td>
</tr>
<tr>
<td valign="bottom" bgcolor="#FFFFFF"><p class="breadcrumb"><!--#config timefmt="%D" -->
This page was last updated on
<?php
$modified = stat("thanks.php");
echo date("m/d/Y", $modified[9]);
?>
</p></td>
</tr>
</table>
</body>
</html>