sending email & text from html form to email address via
Posted: Tue Jul 18, 2006 12:56 pm
I created an .html form that uses "sendmail1.php" to send me an email with the information that the user enters. There are 11 fields that I want sent. I'm new to php and don't know what I'm doing wrong.
I'm receiving this error when I hit "submit"
Parse error: parse error, unexpected ',', expecting ']' in /web/virtual/iweb.bbn.com/htdocs/projects/publicize/sendmail1.php on line 3
*********************************
code from PHP sendmail1.php
<?
$email = $_REQUEST['email'] ;
$emailmessage = $_REQUEST['seriestype','seminardate','seminarlocation','seminartitle','description','speakername','speakerbio','speakerphoto'] ;
mail( "kgrenier@bbn.com", "SDP Seminar Iweb Online Request",
$emailmessage, "From: $email" );
header( "Location: thankyou.html" );
?>
**************************************
Code from html form:
<form method="post" action="sendmail1.php">
<table border="1" cellspacing="0">
<!--first row-->
<tr valign="top">
<td><font size="2">Your Name </font></td>
<td><font size="2"><input type="text" name="yourname" /></font></td>
</tr>
<tr valign="top">
<td><font size="2">Your Email </font></td>
<td><font size="2"><input type="text" name="email" size="15" /></font></td>
</tr>
<!--second row-->
<tr>
<td><font size="2">Type of SDP Seminar </font></td>
<td><select name="seriestype" size="1">
<option value=""></option>
<option value="Acoustic Technologies">Acoustic Technologies</option>
<option value="Agent Technology">Agent Technology</option>
<option value="Artificial Intelligence and Computer Games">Artificial Intelligence and Computer Games</option>
<option value="Distinguished Guest Lecturers">Distinguished Guest Lecturers</option>
<option value="Distributed Systems">Distributed Systems</option>
<option value="Education and Training">Education and Training</option>
<option value="High Performance Embedded Computing">High Performance Embedded Computing</option>
<option value="Information Security">Information Security</option>
<option value="Interface Usability">Interface Usability</option>
<option value="Math and Computation">Math and Computation</option>
<option value="Networking">Networking</option>
<option value="Physical Sciences">Physical Sciences</option>
<option value="Quantum Computing">Quantum Computing</option>
<option value="Robotics">Robotics</option>
<option value="Sensor Systems and Technologies">Sensor Systems and Technologies</option>
<option value="Software Development">Software Development</option>
<option value="Speech and Language Processing">Speech and Language Processing</option>
<option value="Women in Science and Technology">Women in Science and Technology</option>
</select>
</td>
</tr>
<tr valign="top">
<td><font size="2">Seminar Date</font></td>
<td><font size="2"><input type="text" name="seminardate" /></font> </td>
</tr>
<tr valign="top">
<td><font size="2">Seminar Time </font></td>
<td><font size="2"><input type="text" name="time" size="15" /></font></td>
</tr>
<tr valign="top">
<td width="68"><font size="2">Seminar Location</font></td>
<td><font size="2">
<input type="text" name="seminarlocation" />
</font></td>
</tr>
<tr valign="top">
<td width="68"><font size="2">Seminar Title:</font></td>
<td><font size="2">
<textarea name="seminartitle" cols="30"></textarea>
</font></td>
</tr>
<tr valign="top">
<td width="68"><font size="2">Seminar Description:</font></td>
<td><font size="2">
<textarea name="description" cols="30"></textarea>
</font></td>
</tr>
<tr valign="top">
<td width="68"><font size="2">Speaker Name:</font></td>
<td><font size="2">
<input type="text" name="speakername" />
</font></td>
</tr>
<tr valign="top">
<td><font size="2">Speaker Bio:</font>
<p></p></td>
<td><font size="2">
<textarea name="speakerbio" cols="30"></textarea>
</font></td>
</tr>
<tr>
<td><font size="2">Speaker Photo? (Y/N) </font></td>
<td><font face="Times New Roman, Times, serif">
<select name="speakerphoto" size="1">
<option value=""> </option>
<option value="Yes">Yes - please email it to communications@bbn.com</option>
<option value="No">No</option>
</select>
</font></td>
</tr>
</table>
<p>
<input name="submit" type="submit" value="Submit" />
</p>
</form>
*************************************
any help would be appreciated.
I'm receiving this error when I hit "submit"
Parse error: parse error, unexpected ',', expecting ']' in /web/virtual/iweb.bbn.com/htdocs/projects/publicize/sendmail1.php on line 3
*********************************
code from PHP sendmail1.php
<?
$email = $_REQUEST['email'] ;
$emailmessage = $_REQUEST['seriestype','seminardate','seminarlocation','seminartitle','description','speakername','speakerbio','speakerphoto'] ;
mail( "kgrenier@bbn.com", "SDP Seminar Iweb Online Request",
$emailmessage, "From: $email" );
header( "Location: thankyou.html" );
?>
**************************************
Code from html form:
<form method="post" action="sendmail1.php">
<table border="1" cellspacing="0">
<!--first row-->
<tr valign="top">
<td><font size="2">Your Name </font></td>
<td><font size="2"><input type="text" name="yourname" /></font></td>
</tr>
<tr valign="top">
<td><font size="2">Your Email </font></td>
<td><font size="2"><input type="text" name="email" size="15" /></font></td>
</tr>
<!--second row-->
<tr>
<td><font size="2">Type of SDP Seminar </font></td>
<td><select name="seriestype" size="1">
<option value=""></option>
<option value="Acoustic Technologies">Acoustic Technologies</option>
<option value="Agent Technology">Agent Technology</option>
<option value="Artificial Intelligence and Computer Games">Artificial Intelligence and Computer Games</option>
<option value="Distinguished Guest Lecturers">Distinguished Guest Lecturers</option>
<option value="Distributed Systems">Distributed Systems</option>
<option value="Education and Training">Education and Training</option>
<option value="High Performance Embedded Computing">High Performance Embedded Computing</option>
<option value="Information Security">Information Security</option>
<option value="Interface Usability">Interface Usability</option>
<option value="Math and Computation">Math and Computation</option>
<option value="Networking">Networking</option>
<option value="Physical Sciences">Physical Sciences</option>
<option value="Quantum Computing">Quantum Computing</option>
<option value="Robotics">Robotics</option>
<option value="Sensor Systems and Technologies">Sensor Systems and Technologies</option>
<option value="Software Development">Software Development</option>
<option value="Speech and Language Processing">Speech and Language Processing</option>
<option value="Women in Science and Technology">Women in Science and Technology</option>
</select>
</td>
</tr>
<tr valign="top">
<td><font size="2">Seminar Date</font></td>
<td><font size="2"><input type="text" name="seminardate" /></font> </td>
</tr>
<tr valign="top">
<td><font size="2">Seminar Time </font></td>
<td><font size="2"><input type="text" name="time" size="15" /></font></td>
</tr>
<tr valign="top">
<td width="68"><font size="2">Seminar Location</font></td>
<td><font size="2">
<input type="text" name="seminarlocation" />
</font></td>
</tr>
<tr valign="top">
<td width="68"><font size="2">Seminar Title:</font></td>
<td><font size="2">
<textarea name="seminartitle" cols="30"></textarea>
</font></td>
</tr>
<tr valign="top">
<td width="68"><font size="2">Seminar Description:</font></td>
<td><font size="2">
<textarea name="description" cols="30"></textarea>
</font></td>
</tr>
<tr valign="top">
<td width="68"><font size="2">Speaker Name:</font></td>
<td><font size="2">
<input type="text" name="speakername" />
</font></td>
</tr>
<tr valign="top">
<td><font size="2">Speaker Bio:</font>
<p></p></td>
<td><font size="2">
<textarea name="speakerbio" cols="30"></textarea>
</font></td>
</tr>
<tr>
<td><font size="2">Speaker Photo? (Y/N) </font></td>
<td><font face="Times New Roman, Times, serif">
<select name="speakerphoto" size="1">
<option value=""> </option>
<option value="Yes">Yes - please email it to communications@bbn.com</option>
<option value="No">No</option>
</select>
</font></td>
</tr>
</table>
<p>
<input name="submit" type="submit" value="Submit" />
</p>
</form>
*************************************
any help would be appreciated.