n, 22 Oct 2001 12:28:38 -0500 Rick Emery <[EMAIL PROTECTED]> wrote:
> >
> > > Construct your INSERT a piece at a time. Something like:
> > >
> > > $sql = "INSERT INTO $myanet02
> > > (staffdev,strategies,rules,news,information,policies) VALUES(";
> (staffdev,strategies,rules,news,information,policies) VALUES(";
> >
> > for($i=0;$i > if($HTTP_POST_VARS["category{$i}"] == 'yes') {
> > $sql .= "\'$email\',";
> > }
> > else {
> > $sql .= "N
;;
> }
> }
> $sql = substring($sql,0,-1).")";
> //$query = mysql_query($sql,$connect) or die(mysql_error());
> echo $sql;
>
> -Original Message-
> From: Russ Michell [mailto:[EMAIL PROTECTED]]
> Sent: Monday, October 22, 2001 11:23 AM
> To: [EM
Hi all + Rick:
Since the last email I have got even closer, here is the code:
//If submit button selected, process those ticked checkbox categories:
if(isset($submit)) {
//Start off sql
$sql = "INSERT INTO $myanet02 (";
//loop while categories have been ticked
whi
$sql;
>
> -----Original Message-
> From: Russ Michell [mailto:[EMAIL PROTECTED]]
> Sent: Monday, October 22, 2001 11:23 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP-DB] looped insert
>
>
> Hi everyone:
>
> I've been fiddling with this all day, and well - if
Construct your INSERT a piece at a time. Something like:
$sql = "INSERT INTO $myanet02
(staffdev,strategies,rules,news,information,policies) VALUES(";
for($i=0;$imailto:[EMAIL PROTECTED]]
Sent: Monday, October 22, 2001 11:23 AM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] looped i
Hi everyone:
I've been fiddling with this all day, and well - if it was working you wouldn't be
reading this right now! ;-)
My script should take the selections made by users and process them via
straightforward MySQL inserts:
//Get all table column names, dynamically display them as checkboxe