Jump to content
Larry Ullman's Book Forums

Sql Commands For Adding Pages Of Content?


Recommended Posts

On page 124 it says you can use sql commands from your website to populate the database. But the sql commands I got from the download don't have any sample content, all that is in the sql commands is the commands to add the tables to the database. No content. Where can I get the file with the data to populate the tables. Please indicate the url where I can download that. I am trying to populate the pages myself but I keep getting the error which says Please select a category! I added 2 numeric categories to the categories table, but the form still won't accept it. There seems to be a problem with the code of the select menu. I could really use some help with this part of the book. Some help would be appreciated.

Link to comment
Share on other sites

Sorry about that! It looks like the second example does have sample inserts. I'll see if I can export the inserts for the first example. In the meantime, you should be able to easily populate these tables yourself. 

Link to comment
Share on other sites

  • 8 months later...

I am also getting the "Please select a category" error and it won't let me add my page - even after I populated my categories table with a couple of items  I found that there were some lines of code in add_page.php which were commented out (99-101) and other lines active that were "Bonus" for Chap 12 (lines 107 & 108).  When I switched 99-101 to active it let me select a category and added my page.

 

Another note - page 117 of the book is missing the first "if" conditional (if $_server{REQUEST...) and page 119 is missing the code to clear the $_POST array.  In case anyone else is stumped trying to create the code from the book.  Both lines were correct in the download.

Link to comment
Share on other sites

  • 3 weeks later...
 Share

×
×
  • Create New...