tailieunhanh - Beginning PHP6, Apache, MySQL Web Development- P23

Beginning PHP6, Apache, MySQL Web Development- P23:Welcome to Beginning PHP6, Apache, MySQL Web Development , your new trusty resource for assistance in creating your own dynamic web sites. There are a lot of technologies available that can be used to deliver great web sites, and we ’ re glad you chose the Apache/MySQL/PHP (sometimes referred to simply as AMP) approach. You may or may not have had a taste of these three components in the past, but either way we ’ re confident that you will be impressed with the power that lies within them | Appendix A Answers to Exercises echo num1 - num2 else if operator echo num1 num2 else if operator echo num1 num2 else echo UNKNOWN strong div form Chapter 6 1. Create the edit delete code for the people table. Use the movie code as an example. A. One possible solution is as follows. Change as highlighted php connect to MySQL db mysql_connect localhost bp6am bp6ampass or die Unable to connect. Check your connection parameters. make sure our recently created database is the active one mysql_select_db moviesite db or die mysql_error db html head title Commit title head body php switch _GET action case add switch _GET type case movie query INSERT INTO movie movie_name movie_year movie_type movie_leadactor movie_director VALUES . _POST movie_name . . _POST movie_year . . _POST movie_type . . _POST movie_leadactor . . _POST movie_director . break case people query INSERT INTO people people_fullname people_isactor people_isdirector VALUES . _POST people_name . 661 Appendix A Answers to Exercises - _POST people_isactor . - _POST people_isdirector . break break case edit switch _GET type case movie query UPDATE movie SET movie_name . _POST movie_name . movie_year . _POST movie_year . movie_type . _POST movie_type . movie_leadactor . _POST movie_leadactor . movie_director . _POST movie_director . WHERE movie_id . _POST movie_id break case people query UPDATE people SET people_fullname . _POST people_fullname . people_isactor . _POST people_isactor . people_isdirector . _POST people_isdirector WHERE people_id . _GET id break break if isset query result mysql_query query db or die mysql_error db p Done p body html Chapter 7 1. Create a site called A Virtual Vacation. Offer different backgrounds that people can superimpose photos of themselves on and let them send virtual postcards to their friends and family. A. Your code would need to include a background upload page and a result page. We cover sending e-mail postcards in Chapter 11 so you can simply use the .

TỪ KHÓA LIÊN QUAN