Hi hello
This update page is not working. I think is not working due the array.
This is my code
list.php --->
$Results = mysql_db_query ("$DbN","SELECT * from mydb WHERE ID2='$ID'");
<form action="update.php?&ID=<? echo "$ID"; ?>" method="post">
<?
while ($Result = mysql_fetch_array($Results)){
$Name = $Result["Name"];
?>
<input name="Name" type="text" value="<? echo "$Name"; ?>
<input type="submit" value="UPDATE THIS NAME">
<?
}
?>
</form>
update.php
$updating=mysql_query("UPDATE mydb
SET Name='$Name'
WHERE IDavail='$IDavail'");
(ID is coming from another table)
(ID2 is the same ID value but into "mydb" just to relate both tables)
(IDavail is the primary Key from mydb)
I also have tried to do something like WHERE IDav='$ID'"); and it changes all the registers only if I try to update the last result of the array
what makes me think that probably the array doesn´t identify the IDavail.
Is there any particular reason that this might be happening?
Has anyone else experienced this?
Any of your input is greatly appreciated.