Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to Display previous comments on same page
    primarykey
    data
    text
    <p>Basically if the user want to comment on the product,it needs to show the last comments on that product.</p> <p>Here is the Comment.php code and here the data of comments inserting in to the database but the problem is i want to display the previous comments of the product on the same page after the comment box.</p> <p>Any suggestions? </p> <pre><code> &lt;?php include('GenericClasses/GenericCollectionClass.php'); include('Models/UsersModel.php'); include('DataObjects/Users.php'); //If you are not submitting the form HTML will be directly shown if (!isset($_POST['submit'])) { ?&gt; &lt;html&gt; &lt;head&gt; &lt;link href="facebox.css" media="screen" rel="stylesheet" type="text/css" /&gt; &lt;link href="CSS/screen.css" type="text/css" rel="stylesheet" /&gt; &lt;/head&gt; &lt;body&gt; &lt;form action="" method="post" name="postsForm"&gt; &lt;div class="UIComposer_Box"&gt; &lt;span class="w"&gt; &lt;textarea class="input" id="watermark" name="watermark" style="height:50px" cols="50" &gt;&lt;/textarea&gt; &lt;/span&gt; &lt;/div&gt; &lt;div align="left" style="height:30px; padding:10px 5px;"&gt; &lt;input type="submit" name="submit" style="background-color: orange;" value="postComment"&gt; &lt;/div&gt; &lt;?php } else { //If you are submitting the form insert the details into database $Comments = $_POST['watermark']; if (!(empty($Comments))) { $model = new UsersModel(); $rowsCount = $model-&gt;InsertComments($Comments); } if ($rowsCount!=0) { echo'Inserted'; } else{ echo 'Not Inserted'; } } ?&gt; &lt;/form&gt; &lt;/body&gt; &lt;/html&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload