I could try and explain my problem again but it would be easier if I just include the code.
<? if (isset($edit)) { $select = mysql_query("SELECT * from table"); $num_rows = mysql_num_rows($select); for($i=1;$i<=$num_rows;$i++){ $query = "Update table SET StartDate='$FormStartDate.=$i ' where id=$i"; $result = mysql_query($query) or die ("cannot update"); } } else { ?> <form method="post" name="edit server" action="<? echo $PHP_SELF ?>"> <? $query = mysql_query("SELECT * from table"); while ($row = mysql_fetch_array($query)) { $id = $row["id"]; $StartDate = $row["StartDate"]; ?> <input type=text name="FormStartDate<? echo $id ?>" size="15" value="<? echo $StartDate ?>"> <?}?> <input type="submit" name="edit" value="Update Date"></form> Because $FormStartDate1 is the name of the variable, I'm trying to recreate the name of the variable with the for loop after "edit" is submitted. Thanks again. Cory "Chris W. Parker" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] Cory Berry <mailto:[EMAIL PROTECTED]> on Friday, March 05, 2004 11:29 AM said: > Hello, I'm having difficulty dynamically creating a variable name for > mysql_query. [snip] > It doesn't execute. > Can someone tell me what I'm doing wrong. Any help would be greatly > appreciated. ?????? i have no idea what you are saying. care to reword your post? chris. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php