How do i update multiple recodes in php based on form field chechboxes ?

this is a formula i have been regulating though something goes wrong somewhere as well as it fails no errors though it simply reloads a page as well as discards a report i put in

<strong>Update mixed rows in mysql</strong><br>

<?php
$host="xxx.xxx.xxx.xxx";
$username="HSR_CR";
$password="xxxxxxxxx";
$db_name="HSR_CR";
$tbl_name="COPE";

mysql_connect("$host", "$username", "$password")or die("cannot connect");
mysql_select_db("$db_name")or die("cannot name DB");

$sql="SELECT * FROM $tbl_name";
$result=mysql_query($sql);
$count=mysql_num_rows($result);
?>
<table width="500" border="0" cellspacing="1" cellpadding="0">
<form name="form1" method="post" action="">
<tr>
<td>
<table width="500" border="0" cellspacing="1" cellpadding="0">

<tr>
<td align="center"><strong>Id</strong></td>
<td align="center"><strong>Scouts Name</strong></td>
<td align="center"><strong>Troop Number</strong></td>
<td align="center"><strong>Week</strong></td>
<td align="center"><strong>Completion</strong></td>
</tr>
<?php
while($rows=mysql_fetch_array($result)){
?>
<tr>
<td align="center"><? $ID[]=$rows['ID']; ?><? relate $rows['ID']; ?></td>
<td align="center"><input name="ScoutName[]" type="text" id="ScoutName" value="<? relate $rows['ScoutName']; ?>"></td>
<td align="center"><input name="TroopNumber[]" type="text" id="TroopNumber" value="<? relate $rows['TroopNumber']; ?>"></td>
<td align="center"><input name="Week[]" type="text" id="Week" value="<? relate $rows['Week']; ?>"></td>
<td align="center"><input name="Completion[]" type="text" id="Completion" value="<? relate $rows['Completion']; ?>"></td>
</tr>
<?php
}
?>
<tr>
<td colspan="4" align="center">
<input type="Submit" name="Submit" id="Submit" value="Submit">
</td>
</tr>
</table>
</td>
</tr>
</form>
</table>
<?php
if($Submit){
for($i=0;$i<$count;$i++){
$sql1="UPDATE $tbl_name SET Completion='$Completion[$i]' WHERE ID='$ID[$i]'";
$result1=mysql_query($sql);
}
}

if($result1){
header("location:index.php");
}
mysql_close();
?>

How to send multiple HTML text inputs with same name into a SQL database with PHP?

I have a webpage we wrote in HTML, which has a javascript symbol which will supplement a quarrel to a list to concede mixed inputs. Each iteration of a submit content box has a same name attribute. When submitted, a PHP page connects to an MSSQL database by an ODBC tie as well as posts a inputs. However, if theres some-more than one, usually a single gets posted. Any thought upon how to get a name as well as PHP book to automobile increment a name attribute? Thanks.

How to detect if a user has javascript enabled?

Hello,
I’m guidance some-more as well as some-more about web growth each day as well as we longed for to know if there was the approach to acknowledge either or not the user had javascript enabled regulating HTML, JavaScript (itself), Perl or PHP. we would unequivocally similar to it if we came up with an answer which uses a single of those items. if there is none, greatfully contend so.