Workshop


The workshop is designed to help you anticipate possible questions, review what you've learned, and begin putting your knowledge into practice.

Quiz

1.

How is the topic ID value passed to the showtopic.php script?

2.

What else, besides telling the user that the topic was successfully added, could we do at the end of the do_addtopic.php script?

Quiz Answers

1.

Through the $_GET superglobal, named as the the value of $_GET["topic_id"].

2.

Just like with the replytopost.php script, we could eliminate the message display and simply redirect the user to the topic she just created, showing the new topic and post in all its glory.

Activity

You'll notice that none of these pages are really tied together with any sort of navigation. Take these basic framework scripts and apply some navigational flow to them. Make sure that users can always add a topic or return to the topic list from any given page, for example.

If you're feeling really ambitious, use the information provided in the Q&A section to integrate and display multiple forums into your tidy little discussion board.




Sams Teach Yourself PHP, MySQL And Apache All in One
Sams Teach Yourself PHP, MySQL and Apache All in One (3rd Edition)
ISBN: 0672328739
EAN: 2147483647
Year: 2004
Pages: 327

Similar book on Amazon

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net