BOOK: Beginning PHP5, Apache, and MySQL Web Development ISBN: 978-0-7645-7966-0
This is the forum to discuss the Wrox book Beginning PHP5, Apache, and MySQL Web Development by Elizabeth Naramore, Jason Gerner, Yann Le Scouarnec, Jeremy Stolz, Michael K. Glass; ISBN: 9780764579660
You are currently viewing the BOOK: Beginning PHP5, Apache, and MySQL Web Development ISBN: 978-0-7645-7966-0 section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
Chapter 4: Pages 130 - 132 Querying for reviews & Displaying the reviews
Hello;
I am current at the end of chapter four working on pages 130 - 132 in the Try it out sections titled 'Querying for the Reviews' and 'Displaying the Reviews' and I am having a problem. Followiing the directions given on these pages I modified my movie_details.php page accordingly but at the end when I load Table3.php into my browser, I can click on the link for each of the movies but when the movie details page comes up for each movie, all I get is the information for each movie showing it health and with the title underlined on the screen. However, I can't click on the underlined title to get the movie reviews to show for each page. I have typed this code in twice now and reviewed what I typed in at least 3 times and can not find any errors in my code that would be causing this to happen. Can someone take a look at my code below and tell me if and where I may have made an error and what I need to do to correct it so I can see the movie reviews? BTW, I was very careful not to leave any white space after the variables.
<?php
$link = mysql_connect("localhost","bp5am","bp5ampass")
or die(mysql_error());
mysql_select_db("moviesite")
or die(mysql_error());
/* Function to calculate if a movie made a profit,
loss or broke even */
function calculate_differences($takings, $cost) {
$difference = $takings - $cost;