Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

PHP PHP User Authentication Building the Library Building the Book List

Book does not get added and I'm not redirected to desired page.

Well, I've followed this video step by step, ensuring double quotes are used when required, no bit of syntax is left out, and I think I understood a good part of the logic, but after several attempts, I don't know why everything Alena did in the video didn't give me the same results i.e the page redirection and the book added to the book list.

Glenré Charl Labuschagné
Glenré Charl Labuschagné
23,204 Points

Hi Daniel, are you working locally or in the online workspace?

3 Answers

Hi Charl,

Thanks for getting back to me so quick. I'm working in the online workspace.

Glenré Charl Labuschagné
Glenré Charl Labuschagné
23,204 Points

Would you kindly please share your workspace for me to better assist.

Hi Charl,

I believe this is a snapshot of my workspace for this: https://w.trhou.se/pkez4ss8oe

Glenré Charl Labuschagné
Glenré Charl Labuschagné
23,204 Points

Hi Daniel. Thank you for sharing your workspace. In your addBook.php file you are missing the php tag on line 1. After adding it, all works fine. Good job and keep on coding.

Oh my word! Thanks a lot Charl. In going through the syntax I missed checking the very first line of that file. That indeed shows that anyone could miss anything when writing code. Works like a charm now.