topical media & game development
basic-php-04-movie-details-rev05.php / php
<?php
takings, difference = cost;
if (difference = substr(font_color = 'red';
" . difference > 0) {
profit_or_loss = "difference . "m";
} else {
profit_or_loss = "Broke even";
}
return "<font color=\"profit_or_loss . "</font>";
}
/* Function to get the director's name from the people table */
function get_director() {
global director;
movie_director'";
query_d)
or die(mysql_error());
results_d);
extract(director = movie_leadactor;
global query_a = "SELECT people_fullname " .
"FROM people " .
"WHERE people_id='results_a = mysql_query(row_a = mysql_fetch_array(row_a);
people_fullname;
}
_GET['movie_id'] . "'";
movie_query, movie_table_headings=<<<EOD
<tr>
<th>Movie Title</th>
<th>Year of Release</th>
<th>Movie Director</th>
<th>Movie Lead Actor</th>
<th>Movie Running Time</th>
<th>Movie Health</th>
</tr>
EOD;
review_query = "SELECT * FROM reviews " .
"WHERE review_movie_id ='" . review_result = mysql_query(link)
or die(mysql_error());
while(review_result)) {
review_title[] = reviewer_name[] = ucwords(review[] = review_date[] = review_rating[] = generate_ratings(i = 0;
i<sizeof(review_details .=<<<EOD
<tr>
<td width="15%" valign="top" align="center">i]</td>
<td width="15%" valign="top">i]</td>
<td width="10%" valign="top">i]</td>
<td width="50%" valign="top">i]</td>
<td width="10%" valign="top" align="center">i]</td>
</tr>
EOD;
row = mysql_fetch_array(movie_name = movie_director = movie_leadactor = movie_year = movie_running_time = movie_takings = movie_cost = movie_health = calculate_differences(movie_cost);
movie_name</title>
</head>
<body>
EOD;
movie_name: Details</h2></u></th>
</tr>
movie_name</td>
<td align="center">director</td>
<td align="center">movie_running_time</td>
<td>review_flag) {
review_table_headings
page_end =<<<EOD
</body>
</html>
EOD;
page_start
page_end
EOD;
echo review_rating) {
i=0; review_rating; movie_rating .= "<img src=\"thumbsup.gif\"> ";
}
return
(C) Æliens
20/2/2008
You may not copy or print any of this material without explicit permission of the author or the publisher.
In case of other copyright issues, contact the author.