as you can see I'm making a 'post' using echo. I'm "echoing" the data from the database table. I need a special link that will lead to only specific post, like every post should have a specific link. How can I make that using php and/or if I cant use php for that how can I do it in javascript? You can see the code bellow.
$sql = "SELECT Nick, Mail, Message, ID FROM Approved";
$result = mysqli_query($conn, $sql);
if (mysqli_num_rows($result) > 0) {
// output data of each row
while($row = mysqli_fetch_assoc($result)) {
$Nick = $row["Nick"];
$Mail = $row["Mail"];
$Message = $row["Message"];
echo '<div style ="text-align:center; font-size: 100%; margin-top: 9%; font-family:Arial, Helvetica, sans-serif">' . "Nick: " . $Nick . '</div>';
echo '<div style =`enter code here`"text-align:center; font-size: 100%; margin-top: 4%; font-family:Arial, Helvetica, sans-serif">' ."Message:" . $Message . '</div>';
}
} else {
echo "0 results";
}
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…