Hello allI want to make a simple reviews system,it contain writer folder and mine folder.The writer folder contain index.php where the writer write the review and show.php where the review is inserted to mysql.Here is index.php in writer folder:
<h1>Make a Review</h1><br> <form name="input" action="show.php" method="post">Title: <input type="text" name="title" size="20"><br>Review:<textarea rows="10" cols="45" name="review"></textarea><br><br><input type="submit" value="Submit"></form>
and here is the show.php
<b>Title:</b><br> <?php echo $_POST["title"]; ?><br><br><b>Review:</b><br> <?php echo $_POST["review"]; ?><?$con = mysql_connect(localhost,***,***);mysql_select_db("db", $con);mysql_query("INSERT INTO reviews (title, review) VALUES ('$_POST[title]', '$_POST[review]')");?>
now i'll show you the mine folder.It contains index.php where is the list with the reviews.index.php
<h1>REVIEWS</h1><br><?php$con = mysql_connect(localhost,**,***);if (!$con) { die('Could not connect: ' . mysql_error()); }mysql_select_db("sqltrain", $con);$result = mysql_query("SELECT title FROM reviews");while($row = mysql_fetch_array($result)) { echo $row['title']; echo "<br />"; }mysql_close($con);?>
Now i don't know what to do further..I want to make when someone click on the titles in index.php to go in a page where's the review.I also can't insert <a href=""></a> in echo $row['title']; i tried with
echo $row['<a href=\"page\">title</a>'];
but there is error i can't do it so can you help me?