topical media & game development
basic-php-04-movie-details-rev04.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;
while (movie_result)) {
row['movie_name'];
row['movie_director'];
row['movie_leadactor'];
row['movie_year'];
row['movie_running_time']." mins";
row['movie_takings'];
row['movie_cost'];
//get director's name from people table
get_director();
//get lead actor's name from people table
get_leadactor();
}
_GET['movie_id'] . "' " .
"ORDER BY review_date DESC";
review_query, 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 align="center">page_end =<<<EOD
</body>
</html>
EOD;
page_start
page_end
EOD;
echo
(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.