Begin with the connection between php and mysql.
It has a template that loads all the friends of userID 666. It uses a connect.php and a friendship.php
This commit is contained in:
18
website/public/template_sql.php
Normal file
18
website/public/template_sql.php
Normal file
@@ -0,0 +1,18 @@
|
||||
<html>
|
||||
<head>
|
||||
</head>
|
||||
<body>
|
||||
<?php
|
||||
|
||||
// database gegevens zijn elders opgeslagen
|
||||
include_once("../queries/connect.php");
|
||||
include_once("../queries/friendship.php");
|
||||
|
||||
$friends = selectAllFriends($db, 666);
|
||||
while($friend = $friends->fetch(PDO::FETCH_ASSOC)) {
|
||||
echo $friend['username'].' '.$friend['onlinestatus'] . "<br />";
|
||||
}
|
||||
|
||||
?>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user