multiple records update

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
derksj
Forum Newbie
Posts: 1
Joined: Mon Mar 03, 2003 7:15 am

multiple records update

Post by derksj »

i have got the following form

$result = mysql_query("SELECT divisie.divisie,
tblcoordinatoren.naam,
tblcoordinatoren.ID,
tblcoordinatoren.afdeling,
tblcoordinatoren.telefoon
FROM tblcoordinatoren
INNER JOIN divisie ON (tblcoordinatoren.divisieID = divisie.divisieID) Order by divisie");
while ($myrow = mysql_fetch_array($result))
{

?>
<table border="0" width="100%">
<tr>
<td width="25%" align="left"><input type="text" name="ID" VALUE="<?php echo $myrow["ID"]; ?>" size="25"></td>
<td width="25%" align="left"><input type="text" name="naam" VALUE="<?php echo $myrow["naam"]; ?>" size="25"></td>
<td width="25%" align="left"><input type="text" name="afdeling" VALUE="<?php echo $myrow["afdeling"]; ?>" size="25"></td>
<td width="25%" align="left"><input type="text" name="telefoon" VALUE="<?php echo $myrow["telefoon"]; ?>" size="25"></td>
echo "</table>";

i realy dont no how i should update these multiple records
i have this code

$sql = "UPDATE tblcoordinatoren
SET naam='$naam',afdeling='$afdeling',telefoon='$telefoon',divisieID='$divisie' WHERE ID = $ID";
$result = mysql_Query($sql);
User avatar
twigletmac
Her Royal Site Adminness
Posts: 5371
Joined: Tue Apr 23, 2002 2:21 am
Location: Essex, UK

Post by twigletmac »

Have you read:
viewtopic.php?t=511

Mac
Post Reply