hi,
i have this script. It displays the data from my dbase but what I would like to do is instead of calling the add_entry10.php, i'll press the add entry button then another row will be inserted on the table which are ready to be filled up by the users and update
after pressing the enter button. Is this possible? I really can't figure out how am I going to do it.
<?php
$db = mysql_connect("localhost", "root");
mysql_select_db("mydb",$db);
$result = mysql_query("SELECT * FROM employees",$db);
if ($myrow = mysql_fetch_array($result)) {
echo "<table border=1>\n";
echo "<tr><td></td><td>Id</td><td>Name</td><td>Address</td><td>Position</td></tr>\n";
do {
printf("<tr><td><input type=\"checkbox\" name=\"Name\"></td><td>%s<td>%s %s</td><td>%s<td>%s</tr>\n", $myrow["id"], $myrow["first"], $myrow["last"], $myrow["address"],$myrow["position"]);
} while ($myrow = mysql_fetch_array($result));
echo "</table>\n";
} else {
echo "Sorry, no records were found!";
}
echo "<Br><Br>";
echo "<table width=500 border=0><tr><td align=center>\n";
echo "<form method=\"post\" action=\"add_entry10.php\">\n";
echo "<input type=\"submit\" value=\"Add up your name\">\n";
echo "</form></td>\n";
echo "<Br><Br>";
echo "<table width=500 border=0><tr><td align=center>\n";
echo "<form method=\"post\" action=\"edit-del.php\">\n";
echo "<input type=\"submit\" value=\"Lists for Modification & Deletion\">\n";
echo "</form></td>\n";
?>
Thanks!