Quote:
You are beginning to lose me.
But if you want checkboxes to be re-appear on another page, still in their same state,
Hi CodeGreen and thanx for the reply...
I have managed to insert the checkbox checked data into mysql database.Below is the code for it.Now the main problem ,as i earlier mentioned is,how to make the checked status of the checkbox visible in the next page while updating the data.
I want that as i open the update/edit form the already cheked checkboxes be displayed..and later on i could update them by cecking on some other or the same checkbox.This updated data should also be updated i the datanase.
The same goes in case of Radiobuttons also.
I have managed to insert and update data for the entire form.Only checkbox and radiobutton are remaining.So..if u can guide me to the end of this solution..that would be great...Otherwise also it would be great [:)]
Here goes the code....
[PHP]
if(isset($_POST['submit']))
{//handle the form
$message=NULL;
$type=$_POST['type'];
$type = implode(",", $type);
$query ="insert into form (type) VALUES('$type');
$result =mysql_query($query);
if(!$result){die(mysql_error());}
else {echo 'Record Inserted';}
<form name="form" id="form" action="<?php echo $_SERVER['PHP_SELF'];?>" method="post" >
<table width="90%" align=center cellpadding=2 class=medium>
<tbody>
<tr>
<td width="51%"><font color="#333333" size="1"
face="Verdana, Arial, Helvetica, sans-serif"><br>
<input type=checkbox id=1 value="Logo/Brochure " name=type[0]>
Logo/Brochure </font></td>
<td><font color="#333333" size="1"
face="Verdana, Arial, Helvetica, sans-serif"><br>
<input type=checkbox id="2" value= Software/Web Application Development name=type[1]>
Software/Web Application Development</font></td>
</tr>
<tr>
<td width="51%"><font color="#333333" size="1"
face="Verdana, Arial, Helvetica, sans-serif"><br>
<input type=checkbox id=3 value=CD presentations name=type[2]>
CD presentations</font></td>
<td><font color="#333333" size="1"
face="Verdana, Arial, Helvetica, sans-serif"><br>
<input type=checkbox id=4 value=2D/3D animations name=type[3]>
2D/3D animations</font></td>
</tr>
<tr>
<td><font color="#333333" size="1"
face="Verdana, Arial, Helvetica, sans-serif"><br>
<input type=checkbox id=5 value= Web Banner/Intro name=type[4]>
Web Banner/Intro</font></td>
<td><font color="#333333" size="1"
face="Verdana, Arial, Helvetica, sans-serif"><br>
<input type=checkbox id=6 value=E-learning name=type[5]>
E-learning </font></td>
</tr>
[/PHP]
Here i have used array values like...type[0],type[1]....type[6].
using the same table and array now these checkboxes are to be updated..So please help...if you can..
Thanx and Regards
TechnoAtif