first I enter key to view then pull from mySQL table the data...and display in table attached. I want to allow the user to update the data, but having problem figuring out how to determine what has changed in the array. How do I pass the data into a multidimen. array and then to another form.
this is the table data code:
print("<td align=\"center\" width=\"5%\" bgcolor=\"$color\"><center><small>");
print("<font face=\"Verdana\"><strong><input style=\"background-color:#C0C0C0\" type=\"text\" name=\"recordid[]\" size=\"10\" value=\"$row[0]\"/ readonly></strong></font></small></td>");
print("<td align=\"center\" width=\"5%\" bgcolor=\"$color\"><center><small>");
print("<font face=\"Verdana\"><strong><input type=\"text\" name=\"company[]\" size=\"04\" value=\"$row[1]\"/></strong></font></font></small></center></td>");
print("<td align=\"center\" width=\"5%\" bgcolor=\"$color\"><center><small>");
print("<font face=\"Verdana\"><strong><input type=\"text\" name=\"account[]\" size=\"20\" value=\"$row[2]\"/></strong></font></small></center></td>");
print("<td width=\"5%\" bgcolor=\"$color\"><center><small>");
print("<font face=\"Verdana\"><strong><input type=\"text\" name=\"center[]\" size=\"04\" value=\"$row[3]\"/></strong></font></small></center></td>");
print("<td width=\"5%\" bgcolor=\"$color\"><left><small>");
print("<font face=\"Verdana\"><strong><input type=\"text\" name=\"intorder[]\" size=\"20\" value=\"$row[4]\"/></strong></font></small></left></td>");
print("<td width=\"5%\" bgcolor=\"$color\"><left><small>");
print("<font face=\"Verdana\"><strong><input type=\"text\" name=\"alloc[]\" size=\"20\" value=\"$row[5]\"/></strong></font></small></left></td>");
print("<td width=\"5%\" bgcolor=\"$color\"><left><small>");
print("<font face=\"Verdana\"><strong><input type=\"text\" name=\"percent[]\" size=\"4\" value=\"$row[6]\"/></strong></font></small></left></td>");
print("<td width=\"5%\" bgcolor=\"$color\"><left><small>");
print("<font face=\"Verdana\"><strong><input type=\"text\" name=\"pon[]\" size=\"5\" value=\"$row[9]\"/></strong></font></small></left></td>");
i want user to be able to make changes in the input box that are not readonly and click update button and rewrite the data to mySQL.
i've built this array in the form where i create the table, but i can't get the data to pass to another form.
$myArray = array("recordids" => array("recordid" => $row[0]),
"companys" => array("company" => $row[1]),
"accounts" => array("account" => $row[2]),
"centers" => array("center" => $row[3]),
"intorders" => array("intorder" => $row[4]),
"allocs" => array("alloc" => $row[5]),
"percents" => array("percent" => $row[6]
);
echo $myArray["companys"]["company"];
this echo will display all 3 companys from the .jpg [032,033,046] but when i try to display the array when click update button in another form i don't have any data...
Anybody got code currently doing something like this?
thanks,
futch