Jump to content

Database entry form


Rogue3

Recommended Posts

I made a form so that I can add entries into my database, and I need help tweaking the end result a bit. Everything works just fine, the only part I can't figure out is when I enter an item in the database and click my submit button, the page that comes up shows all entries in the database. I'd like it to only show the one I JUST put in (for verification purposes).

Here is my code:

[code]mysql_connect(localhost,$username,$password);
@mysql_select_db($database) or die( "Unable to select database");
$query="SELECT * FROM mytable";
$result=mysql_query($query);

$num=mysql_numrows($result);

mysql_close();

echo "<b><center>JTA Database Entry</center></b><br><br>";

$i=0;
while ($i < $num) {

$series=mysql_result($result,$i,"series");
$type=mysql_result($result,$i,"type");
$mfg=mysql_result($result,$i,"mfg");
$year=mysql_result($result,$i,"year");
$name=mysql_result($result,$i,"name");
$link=mysql_result($result,$i,"link");[/code]

Link to comment
https://forums.phpfreaks.com/topic/13838-database-entry-form/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.