I can get the info from the database fine with this:

Code:
$sql2 = "SELECT 1, 2, 3, 4, 5, 6
			FROM ratestable
			ORDER BY id ASC";
			$stmt2 = $db->prepare($sql2);
			$stmt2->execute();
			$e2 = $stmt->fetch();

and display it with this:

Code:
 <?php
	  while($e2 = $stmt2->fetch())
	  {
	?>
   <input type="text" name="1" maxlength="10" value="<?php echo $e2['1'] ?>" class="rates" />
   <input type="text" name="2" maxlength="10" value="<?php echo $e2['2'] ?>" class="rates" />
   <input type="text" name="3" maxlength="10" value="<?php echo $e2['3'] ?>" class="rates" />
   <input type="text" name="4" maxlength="10" value="<?php echo $e2['4'] ?>" class="rates" />
   <input type="text" name="5" maxlength="10" value="<?php echo $e2['5'] ?>" class="rates" />
   <input type="text" name="6" maxlength="10" value="<?php echo $e2['6'] ?>" class="rates" />
   <?php
      }
   ?>

How do I update it to the database?

Code:
THIS IS WHERE I AM STUCK....

$sql = "UPDATE ratestable
					SET dates=?, night=?, week=?, month=?, min=?, rank=? 
					WHERE id=?";
			$stmt = $db->prepare($sql);
			$stmt->execute(array(
								$_POST['dates'],
								$_POST['night'],
								$_POST['week'],
								$_POST['month'][,
								$_POST['min'],
								$_POST['rank'],
								$_POST['id'],
								));
			$stmt->closeCursor();

THIS IS WHERE I AM STUCK....
and that's as far as I can get, Do I need to use an array/loop or foreach and how do I implement it???????