Jump to content
Larry Ullman's Book Forums
Sign in to follow this  
grahamgr3

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.

Share this post


Link to post
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. 

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

Sorry about the confusion and for the mistake. I'll make sure that's added to the errata page and fixed.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...