Hi all fellows, i am in a messed up situation right now, i have a table in mysql containing different currencies and their values, i have generated a form in php which display them both, but now i want to update them. my mysql database has 2 fields 1. curr_name 2. curr_amount, i am reading both of them in a text box so that it can be updated, my php code here.. [php]echo "<table width='100%'>";
while($curr=mys ql_fetch_array( $result2))
{
$a=$curr['curr_name'];
echo "<tr><td>";
echo "<input name='" . $curr['curr_name'] . "' value='" . strtoupper($a) . "'>";
echo "<td><input name='" . $curr['curr_name'] . "' value='" . $curr['curr_amount'] . "'>";
echo "<td><a href='delete.ph p?currency=" . $curr['curr_name'] . "' >Delete Record</a>";
}
echo "</table>";[/php]as u would have noticed i am also deleting the record by sending information by GET method, which is working, but i need to update the values in the text fields.
this form has also function of inserting new records, so it has update, insert and delete opeartions. only update is messed up.
Plz help me out.
while($curr=mys ql_fetch_array( $result2))
{
$a=$curr['curr_name'];
echo "<tr><td>";
echo "<input name='" . $curr['curr_name'] . "' value='" . strtoupper($a) . "'>";
echo "<td><input name='" . $curr['curr_name'] . "' value='" . $curr['curr_amount'] . "'>";
echo "<td><a href='delete.ph p?currency=" . $curr['curr_name'] . "' >Delete Record</a>";
}
echo "</table>";[/php]as u would have noticed i am also deleting the record by sending information by GET method, which is working, but i need to update the values in the text fields.
this form has also function of inserting new records, so it has update, insert and delete opeartions. only update is messed up.
Plz help me out.
Comment