ShaileshShinde
asked on
Inserting updated values in mysql database
Hello Experts,
I am displaying the query results like below on php page....
From mysql there were two rows resulted which is displaying as per the code below...
If user updates the value in one of the input type text...i would like to updated that value in database.
Can you suggest how to updates the values in mysql where $_POST['test'] this test will might be test_1 or test_2 and so on...
Thanks,
Shail
I am displaying the query results like below on php page....
From mysql there were two rows resulted which is displaying as per the code below...
echo "<tr class=\"d" . ($i & 1) . "\">
<td><input class=textboxa type=text style=\"font-style: Italic;font-weight: bold;\" value=\"$i\" /><br/></td>
<td><input name=test_$i class=textboxc type=text style=\"font-style: Italic;font-weight: bold;\" value=\"" . $row['Delivery'] . "\" title=Delivery /><br/></td>
<td><input name=subtest_$i class=textboxc type=text style=\"font-style: Italic;font-weight: bold;\" value=\"" . $row['quality'] . "\" title=quality /><br/></td></tr>";
If user updates the value in one of the input type text...i would like to updated that value in database.
Can you suggest how to updates the values in mysql where $_POST['test'] this test will might be test_1 or test_2 and so on...
Thanks,
Shail
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks Experts
ASKER
In php i kept name="test[]" and in the POST
for($i=0;$i<count($_POST['
$test = $_POST['test'][$i] ;
echo "$test";
}
However, this is throwing an error message as "Notice: Undefined index: test in info_r2b.php on line 1"
Can you suggest what's gone wrong in this?
Thanks,
Shail