Created
April 19, 2016 15:28
-
-
Save CharlesCraft50/3502a4e9d8fb441c4a91dbbe5b304f0a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
include('database.php'); | |
$getCmts = $conn->prepare("SELECT * FROM PostComments WHERE SubjecName = ? ORDER BY DatePosted DESC LIMIT ?"); | |
$SName = $_GET['SubjecName']; | |
$CLimit = $_GET['cmtsLimit']; | |
$getCmts->bind_param('si', $SName, $CLimit); | |
$getCmts->execute(); | |
$getCmts->bind_result($Id, $Name, $Comment, $DatePosted); | |
while($getCmts->fetch()) { | |
echo "<pre style=\"background-color: #fafafa; padding: 0px;\">"; | |
echo "<p name=\"" . $Id . "\">Id: " . $Id . " User: <b>" . $Name . "</b>" . " Comment Date: " . $DatePosted . "</p>"; | |
echo $Comment; | |
echo "<a name=\"" . $Id . "\"></a>"; | |
echo "</pre>"; | |
} | |
$conn->close(); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment