Weekly Recap | March 3, 2011

Lecture Notes

  • Announcements
  • Review of Project 3 – Navigation & Sitemaps with PHP Server side includes  -  review some student projects – the jquery sliding footer
  • Review of MySQL Database fundamentals
  • Dreamweaver Server Behaviors with PHP & MySQL

Assignments

  • Lesson 6 in Training From the Source
  • Project 4 is due Sunday March 13 at midnight – create a website with several internal pages that are password-protected using the server behavior techniques on pages 170-192 Lesson 6.   Include at least one page that lists the users table rows (using the recordset behavior explained on pages 192-197.)
  • Quiz 2

10 comments for “Weekly Recap | March 3, 2011

  1. Annette Kirchner
    March 9, 2011 at 4:57 pm

    Question from Lesson 6 – I could not get the php password encryption code on p. 191 to work. Will we be covering this in class this week?

    A php error showed up later in the document around line 69.

    • March 9, 2011 at 5:12 pm

      Yes, we will be going over the encryption method in class tomorrow.

  2. March 9, 2011 at 7:41 pm

    The add_user.php at the url above works only one time. When I add another user I get this error message: ‘Duplicate entry ’0′ for key 1′. I looked at some blogs about this error and tried some things but it’s beyond me as to what to do to fix it. Any help?

  3. March 9, 2011 at 7:48 pm

    Linda – It sounds like you are trying to insert a row with a value for userid, which is an auto-increment column and you should not set it using Dreamweaver/PHP. It will be set automatically by MySQL when new records are inserted.

  4. March 10, 2011 at 1:13 pm

    I haven’t done anything using Dreamweaver/PHP that I’m aware of. I just followed the book pgs. 177 to 183. What makes you think I am trying to insert a row with a value for userid? What do you see and where do you see it? Can you tell me how to fix it?

  5. Tomas
    March 10, 2011 at 1:50 pm

    Linda – make sure the AI (auto increment) is checked in the user_id column of your mySQL users table.

  6. March 10, 2011 at 1:55 pm

    Linda – The problem in your Insert Record Server Behavior – what does it say about the ‘user_id’ column? It should say: “‘user_id’ is an Unused Primary Key.”

  7. March 10, 2011 at 2:21 pm

    Yep. That’s what it says.

  8. March 10, 2011 at 2:32 pm

    This is the info in the user table:
    `user_id` int(10) unsigned NOT NULL AUTO_INCREMENT,

  9. March 10, 2011 at 2:58 pm

    user_id should also be the Primary Key for the users table.

Comments are closed.