reposting
ok changed some code around
//get table info
$query = "SELECT * FROM `VORVER`";
if($result = mysql_query($query)) {
while ($row = mysql_fetch_array ($result)) {
//print table info
print "<tr><td align=center height=30><input type=\"hidden\" name=\"an[]\" value=". $row["account_number"] .">". $row["account_number"] . "</td><td align=center height=30>". $row["consumer_last_name"] . ", ".$row["consumer_first_name"] . "</td><td align=center height=30>";
if($row["VbyMail"] == NULL) {
print "<input type=text name=VbyMail style=font-family: serif; font-size: 12px; size=25></td>";
}else{
echo $row["VbyMail"] . "</td>";
}
print "<td align=center height=30>";
if($row["VbyFax"] == NULL) {
print "<input type=text name=VbyFax style=font-family: serif; font-size: 12px; size=25></td>";
}else{
echo $row["VbyFax"] . "</td>";
}
print "<td align=center height=30>";
if($row["Returned"] == NULL) {
print "<input type=text name=Returned style=font-family: serif; font-size: 12px; size=25></td>";
}else{
echo $row["Returned"] . "</td>";
}
print "</tr>";
}// end while
}// end if
removed if(posted blah)
foreach($_POST['an'] as $AN)
{
echo "<pre>" . print_r($_POST, true) . "</pre>";
$VBM = ($_POST['VbyMail']);
$VBF = ($_POST['VbyFax']);
$RET = ($_POST['Returned']);
echo "UPDATE `securedb_sbsclients`.`VORVER` SET `VbyMail`= '$VBM', `VbyFax`='$VBF', `Returned`= '$RET' WHERE `account_number`='$AN'<br/>\n";
}
and i'm getting
Array
(
[an] => Array
(
[0] => 13392
[1] => 13403
)
[VbyFax] => 04/02/12
[Returned] =>
[VbyMail] => na
[update_x] => 58
[update_y] => 11
)
UPDATE securedb_sbsclients.VORVER SET VbyMail= 'na', VbyFax='04/02/12', Returned= '' WHERE account_number='13392'
Array
(
[an] => Array
(
[0] => 13392
[1] => 13403
)
[VbyFax] => 04/02/12
[Returned] =>
[VbyMail] => na
[update_x] => 58
[update_y] => 11
)
UPDATE securedb_sbsclients.VORVER SET VbyMail= 'na', VbyFax='04/02/12', Returned= '' WHERE account_number='13403'
I put in fax=na returned=a date mail=na fax=a date returned=blank
lilRachie