Re: checked / unchecked

From: Date: Sun, 28 Sep 2003 17:29:12 +0000
Subject: Re: checked / unchecked
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-164173@lists.php.net to get a copy of this message
It's working.. Thanks a lot ----- Original Message ----- From: "Jason Sheets" <jsheets@idahoimageworks.com> To: "phpu" <phpu@go.ro> Sent: Sunday, September 28, 2003 6:55 PM Subject: Re: [PHP] checked / unchecked > With a conditional, note that if you have more than one picture your > current setup is not going to work. > > if ($_REQUEST['modify_picture'] == 'check') { > // do update code here > } > > If you will ever have more than one picture at a time you should > probably use an array instead of just one variable for modify_picture. > > Jason > > phpu wrote: > > >Hi > >I have this form: > > > > <form action="modify.php" method="POST" > > enctype="multipart/form-data"> > ><? > >$sql = "SELECT * FROM table Where id_cat=".$_POST['id_cat']; > >$result = mysql_query($sql); > >while ($row=mysql_fetch_array($result)) > >{ > > > >print 'Category<input type="text" name="nume_categorie" value="'.$row['category_name'].'"><br>Picture > ><input name="modify_picture" type="checkbox" > >id="modify_picture" value="check">'; > >} > >?> > ><input name="submit" type="submit" value="Modify"> > ></form> > > > > > >All i wanna do is to modify picture only if the modify_picture checkbox is checked. How can i do that? > > > >thanks > > > > > > > >

« previous php.general (#164173) next »