I'm having trouble displaying my selected data through MYsql. I have values already stored in the fields in my database and when the user clicks the submit button and the review of the selected movie should populate but its not.
Here is my code for the form in php.
echo "<tr><td>".$utitle."</td><td>".$ucategory."</td><td>".$ulength."</td><td>Thumbs up</td>t<td></td>";
echo '<form action = "videos.php" method="POST">';
echo "<td><input type='hidden' name='read' value=".$uid."><input type='submit' value='Read the Review' name='read'></td></tr></form>";
And here is my code when the button is clicked.
if(isset($_POST['read'])){
$readReview = "SELECT Review FROM MyVideos WHERE id='$_POST[read]'";
$read = $con->query($readReview);
if($read->num_rows>0){
while($row=$read->fetch_assoc()){
echo "Review:".$row['Review']."<br/>";
}
}
$read->close();
};
Thanks. Any help is greatly appreciated.