试图用我的用户信息编制一个私人网站清单。
But im having problems doing that.. I need my website list members by ID from database with this informations
id database reference (Hided) - name - DiscordID - ShipID - Email
And i need this div : <div class="home-barra"> USER INFO </div>
got copied and paste all time when retrieve new users.
仍然学习 php编码
<?php
session_start();
if (!isset($_SESSION[ loggedin ])) {
header( Location: index.html );
exit;
}
$DATABASE_HOST = localhost ;
$DATABASE_USER = webaccount ;
$DATABASE_PASS = *********** ;
$DATABASE_NAME = mydatabase ;
$con = mysqli_connect($DATABASE_HOST, $DATABASE_USER, $DATABASE_PASS, $DATABASE_NAME);
if (mysqli_connect_errno()) {
exit( Failed to connect to MySQL: . mysqli_connect_error());
}
$stmt = $con->prepare( SELECT password, email, steamid, discordid FROM accounts WHERE id = ? );
$stmt->bind_param( i , $_SESSION[ id ]);
$stmt->execute();
$stmt->bind_result($password, $email, $steamid, $discordid);
$stmt->fetch();
$stmt->close();
?>
<div class="home-container07">
<-- This need to be copied
<div class="home-barra">
<div class="home-container08">
<span class="home-text07">Nome: <?=$username?></span>
</div>
<div class="home-container09">
<span class="home-text08">Discord: <?=$discordid?></span>
</div>
<div class="home-container10">
<span class="home-text09">SteamID64: <?=$steamid?></span>
</div>
<div class="home-container11">
<span class="home-text10">Email: <?=$email?></span>
</div>
</div>
---->
</div>