I am trying to create a movie review website, the majority of my site is coming together. I do not know how to create a script that will display user reviews on the website. Here is what I have so far for the form, how do I display user reviews after they hit the submit button?

<label>Enter your name here:
<form action="http://www.daaq.net/utils/echopost.php " method= "post" <br/>
First name: <input type="text" name="firstname" /><br/>
Last name: <input type="text" name="lastname" /><br/>

<label>Write Review:

<textarea name= "textareasample" rows="5" cols="30" wrap="physical"> </textarea>

<label>Rate Movie(Double-Click):

<input type="radio" name="rating" value="one"/> One Star <br/>
<input type="radio" name="rating" value="two"/> Two Stars <br/>
<input type="radio" name="rating" value="three"/> Three Stars <br/>
<input type="radio" name="rating" value="four"/> Four Stars <br/>
<input type="radio" name="rating" value="five"/> Five Stars <br/>


<label>Click "Submit" to enter your review and to read other reviews by users.
  <input type="submit" value="Submit" />
6 Years
Discussion Span
Last Post by johnjacob

First of all, where is your data stored? You need to store the data somewhere before you can hope to output anything.


if you use php then this is the best code ever
first get your movie id and store in a var
like this:

$movie_id = $_GET['movie_id'];

and then update your movies table only one field when user view you movie post liky this query:

mysql_query("UPDATE your table name SET `views` = (views+1) WHERE movies_id = '$movie_id' LIMIT 1" );

and print query is ;

$query = "SELECT * FROM movies WHERE movies_id='".$movie_id."' LIMIT 1";
$exe = mysql_query($query, $con);
$row = mysql_fetch_assoc($exe);

and then echo your views for the users

<?php echo "Views" ." " .$row['views']; ?>

Edited by Ezzaral: Added code tags. Please use them to format any code that you post.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.