Jump to content

superninja

Members
  • Posts

    5
  • Joined

  • Last visited

superninja's Achievements

Newbie

Newbie (1/7)

0

Reputation

  1. Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in C:\xampp\xampp\xampp\htdocs\=sqltrain\index.php on line 19 I think it's the same?
  2. Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in C:\xampp\htdocs\simplereview\index.php.php on line 19 please help
  3. superninja

    Reviews system

    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?
×
×
  • Create New...