How can i display something out of my databse by an ID number?
I already can get the data out of the database by searching the row 'content' but i want to get it by an ID number.
I have three rows in my database table: ID, pagename and content.
Here is the code that i already have for getting the data:
<?php
$con=mysqli_connect("localhost","jordyyd108_mario","testdb","jordyyd108_mario");
// Check connection
if (mysqli_connect_errno()) {
echo "Failed to connect to MySQL: " . mysqli_connect_error();
}
$result = mysqli_query($con,"SELECT * FROM pages");
while($row = mysqli_fetch_array($result)) {
echo $row['content'] ;
}
mysqli_close($con);
?>
Thanks!