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>


<label>Write Review:
<br/>

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


<label>Rate Movie(Double-Click):
<br/>

<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>

<label>Click "Submit" to enter your review and to read other reviews by users.
  <input type="submit" value="Submit" />
</form>
</label>

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
like

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

I am using godaddy hosting so I would be storing it there.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.