Code: Select all
<form method="post" action="moves.php">
<?php
$sql = mysql_query("SELECT * FROM `route` WHERE `office`='".$users['office']."' and `date`='".date("d.m.Y")."' ORDER BY `id` DESC;");
while($row=mysql_fetch_array($sql)){
?>
<tr class="initial" onMouseOver="this.className='highlight'" onMouseOut="this.className='normal'">
<td width="15%"><center><?php print (stripslashes(htmlspecialchars($row['name']))); ?></center></td>
<td width="18%"><center><?php print (stripslashes(htmlspecialchars($row['address']))); ?></center></td>
<td width="14%"><center><?php print (stripslashes(htmlspecialchars($row['gsm']))); ?></center></td>
<td width="15%"><center><?php print (stripslashes(htmlspecialchars($row['chas']))); ?></center></td>
<td width="15%"><center><?php print (stripslashes(htmlspecialchars($row['shipment']))); ?></center></td>
<td>
<center><select name="zone[]" value="<?=strval( $row['id'] );?>">
<option select>- - Zones - -</option>
<?
$val=1;
$sqls = mysql_query("SELECT `zones` FROM `office` where `officename`='".$users['office']."' ORDER BY `id` DESC;");
while ($val=mysql_fetch_array($sqls)) {
$zon=$val['zones'];
}
for ($i=1;$i<$zon+1; $i++)
{
?>
<option value="<?php echo "$i"; ?>">Zone: <?php echo "$i"; ?></option>
<?
}
?>
</select></center>
<?
}
?>Code: Select all
foreach($_POST['zone'] as $zones)
{
if ( $zones > "0" ) {
echo "$zones<br>";
}
}