I have a table that looks like this
room date price
128 02-09-2013 15
128 03-09-2013 17
128 04-09-2013 19
If I want to update the field price depending on the dates,
First I have the form with the data:
while($rows=mysql_fetch_array($listprices))
<? $date[]=$rows[date]; ?>
<p style="width:100px;float:left;text-align:center;"><input name="price[]" type="text" value="<? echo $rows[´price´]; ?>"></p>
After that update sql
UPDATE tablename SET price='".$_POST['price'][$i]."' WHERE date='$date[$i]'";
What am I doing wrong?