Thread: Data Table !?
View Single Post
Old Apr 4th, 2006, 8:32 PM   #8
The Dark
Expert Programmer
 
Join Date: Jun 2005
Posts: 884
Rep Power: 4 The Dark is on a distinguished road
In the script that you posted, the "else" part (i.e. when there is posted data) uses variables that haven't been set (they are only set in the non-posted data part).
Each time someone accesses your page, your script starts from the beginning, so this code:
$i2=0;
while ( $i2 < $Brg_Rows ){
$Save_Code=$_POST['phone'.$i2] ;
$DB_Code=mysql_result($Brg_Query,$i2,"phone");
Is using $Brg_Rows and $Brg_Query which haven't been set. Also mysql_result retrieves the value from a result set, it does not do any updates. You need to perform some INSERT, UPDATE or REPLACE sql statements.
The Dark is offline   Reply With Quote