Updating data from HTML text fields to MySQL database with PHP
===

I try to update data from HTML text fields to database using PHP. I would like to update notifications field. I cannot get text field values to SQL query. Here is my code:

    $result = mysql_query($query) or die (mysql_error()); // Run query
    	while($row = mysql_fetch_array($result)) { ?> 
    		<tr><td><?php echo $row[0];?></td>		
    		<td><?php echo $row[1];?></td>
    		<td><?php echo $row[2];?></td>
    		<td><?php echo $row[3];?></td>
    		<td><?php echo $row[4];?></td>
    		<td><input type="text" name="notifications" value="<?php echo $row[5];?>" size=13></td></tr>
    <?php 
    if (isset($_POST['save'])) { 
    	for($i = 0; $i < $count; $i++) // For loop
    	{
    		$id=mysql_result($result,$i,"id"); // Get id from query
    		$notifications = $_POST['notifications'];
    		$update = "UPDATE testtable SET notifications = {$notifications[$i]} WHERE id = {$id}";
    		echo "$update<br>";
    		//mysql_query($update); // Run
    	} 