hello all,
newbie to php here. i'm having some difficulty figuring out how to do some displaying of on certain data from a form.
the deal is i have a ticket order form with 100 possible options. there are 50 different tickets, with the option of selecting the quantity that they want for adult and/or child.
so i'd like to send only the selected items (i.e. greater than 0) to be printed to the next screen and the emails.
not sure i'm even approaching this the right way. i'm basing the form on the following:
[the form]
<HEAD> <TITLE> Form Handling with PHP </TITLE> </HEAD>
<BODY BGCOLOR="#FFFFFF"> <center> <FORM METHOD=POST
ACTION="tellus04.php"> <TABLE> <TR height="20"><TD
colspan="2"><FONT SIZE="-1" face="verdana">Below is a Sample
Form for our PHP tutorial</FONT></TD></TR> <TR height="50">
<td></td></TR> <TR><TD align="left"><FONT SIZE="-1"
face="verdana"> <b>Your Name <br>Your E-Mail
Address <br>Number</b></FONT></td> <td><INPUT TYPE="text"
NAME="name"><br><INPUT TYPE="text" NAME="email"><p></TD>
</TR> <tr><td colspan="2"><center> <SELECT NAME="opinion">
<option value="is great">I like your site</option> <option
value="is OK">Your Site is OK</option> <option value="is
horrible">Your Site is horrible</option> </SELECT><p><INPUT
TYPE="submit" value="Tell us!"></center></td></tr>
</TABLE></FORM></center></BODY>
[the form processer]
<?
PRINT "<center><FONT SIZE=-1 face=verdana>"; PRINT "Greetings $name, thank you for filling out our";
PRINT "form.";
PRINT "</center><p><center><TABLE border=0 width=500";
PRINT "cellspacing=0 cellpadding=7>"; PRINT "<TR><TD><FONT SIZE=-1 face=verdana>"; PRINT "In the form, you stated that our site ";
PRINT "$opinion. Thank you for your input."; PRINT " We will send you more information about our site";
PRINT " in an email to $email.";
PRINT " If you have any more comments, feel free to reply.";
PRINT "</FONT></TD></TR></TABLE></center>";
mail("$email", "Site Information", "Hello $name,\nWe thank
you again for using our form and telling \nus your option
about our site\n\nThis is important to us so we can know how
to improve.\n\nThank you once again.");
mail("erik@visualflux.net", "An Opinion", "$name just
used the form.\n\nThey stated that our site $opinion.");
?>