PHP output results on to one page
- by linda
i have a system where a user searches for a film and reviews appear on a page with a button next to each review. The button can be selected to look at the individual review but i basically want a button that when selected it will look at all reviews on one page, the code i am using for the individual review is this
<?php
ini_set ('display_errors', 1);
error_reporting (E_ALL & ~E_NOTICE);
$searchfilm=$_POST['searchfilm'];
//Connect to database
//Filter search
$searchfilm = strtoupper($searchfilm);
$searchfilm = strip_tags($searchfilm);
$searchfilm = trim ($searchfilm);
$query = mysql_fetch_assoc(mysql_query("SELECT filmreview FROM review WHERE id = '$id'"));
$data = mysql_query("SELECT film.filmname, review.filmreview, review.reviewtitle, review.id FROM film, review WHERE film.filmid = review.filmid AND filmname = '$searchfilm'");
while($row = mysql_fetch_assoc($data))
{
// echo $row['filmname'];
// echo "<b>Film Name:</b> " .$searchfilm;
echo "<table border=\"2\" align=\"left\">";
echo "<tr><td>";
echo "<b>Review Title:</b> " .$row['reviewtitle'];
echo "<tr><td>";
echo $row['filmreview'];
echo "<p>";
echo "<form method='post' action='analyse1.php'>";
echo "<input type='hidden' name='reviewid' value='".$row['id']."'>";
echo "<input type='submit' name='submit' value='Analyse'>";
echo "</form>";
echo "</table>";
}
?>