all i need is first of all keep the first 2 $id and $created of each table without text field(because they're auto).
then I need to make able to enter the data in the form and submit...a new record should appear in the table below.
http://www.qaip.com/~sub/week6_a.php
as soon as you load the page it won't work but if you choose the table it will.
thanks, sub
function insert_row($table,$data){ $query = "DESCRIBE $table"; $result = mysql_query($query);
print "<DIV ALIGN=\"CENTER\">"; print "<table border=1>\n"; print "<FORM METHOD='POST' ACTION='$PHP_SELF'>";
while ($row = mysql_fetch_array($result, MYSQL_NUM)) { print "\t<tr>\n"; print "<td><b>$row[0]</b></td>";
print "<td><INPUT TYPE='text' NAME='data' VALUE='$data' SIZE=13 style=\"border-style:
solid\"></td>";
print "\t</tr>\n";
}
print "<INPUT TYPE='submit' name='submit2' value='Insert a new Row' style=\"border-style: solid\">";
print "</FORM>";
print "</table>\n"; print "</DIV>";
#if($submit2){ #print "$data"; #}
}
?>
-- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php