Re: checkbox data
| From: | Russ Michell | Date: | Thu, 01 Jan 1970 00:00:00 +0000 |
| Subject: | Re: checkbox data | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-7928@lists.php.net to get a copy of this message | ||
olinux:
I have some checkboxes that are generated on the fly that represent a
person signing up for an activity:
<input type=\"checkbox\" name=\"signup[$title_team]\"
value=\"$rowID\" unchecked>
<input type=\"hidden\" name=\"whichForm\"
value=\"sendchk\">";
//On the page this form is submitted to I pick the results up thus:
while(list($key) = each($signup)) {
//Start off SQL query - inserting available values into $table
$query = mysql_query("INSERT INTO $table
(activity,username,email,signedup4,theDate) VALUES
('$id','$username','$ipemail','$key','$completeDate')");
$list = "<p align=\"center\">";
$list .= "<b>'</b>";
$list .= "$key";
$list .= "<b>'<b><br>";
$list .= "</p>";
$resultText = "<h2 align=\"center\">Thanks $username! Your selection has
been recorded succesfully!</h2>";
}
//end-while
HTWI (Hope That Was Informative) - New FLA (Four Letter Acronym)
Russ
#-------------------------------------------------------#
"Believe nothing - consider everything"
Russ Michell
Anglia Polytechnic University Webteam
http://gertrude.sipu.anglia.ac.uk/webteam
r.j.michell@anglia.ac.uk
+44 (0)1223 363271 ext 2331
www.theruss.com
#-------------------------------------------------------#