I made an admin area for a part of my site, that allows the owner of a store to add books into it. They books are user defined, so i want them to be able to make up a book and add it into the database. Ive been working on it for awhile, it seems to never work.
if ($read == Admin) {
print "Welcome back to your admin panel for the Library $stat[name]...
<br><br>
<br><br>
<a href='javascript:history.back();'>...back</a>
";
print "<form method=post action=test.php?read=Admin&step=add>book title <input type=text name=name><br>
Book, html and all<input type=text name=text><br>
short description<input type=text name=desc><br>
<br>
<input type=submit value=Add></form>";
if ($step == add) {
if (!$name || !$text || !$desc ) {
print "You must fill out all fields.";
include("foot.php");
exit;
}
mysql_query("insert into wbooks (name, text, desc) values('$name','$text','$desc')") or die("Could not add book.");
print "$name, $numa, $text, $desc";
}
}
?>
it keeps coming up with could not add book evertime i try...
There is also an id field for wbooks, but that is autoincremental.
Thanks for any help.
-Dusk