1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45
|
<?php
session_start();
$bdd = new PDO('mysql:host=127.0.0.1;dbname=chat', 'root', '');
if(isset($_GET['id']) AND $_GET['id'] > 0)
{
$getid = intval($_GET['id']);
$requser = $bdd->prepare('SELECT * FROM membres WHERE id = ?');
$requser->execute(array($getid));
$userinfo = $requser->fetch();
?>
<html>
<head>
<meta charset="utf-8">
</head>
<body>
<div align="center">
<h2>Profil de <?php echo $userinfo['pseudo'] ?></h2>
<br><br>
Pseudo : <?php echo $userinfo['pseudo'] ?>
<br>
<?php
if(isset($_SESSION['id']) AND $userinfo['id'] == $_SESSION['id'])
{
?>
<a href="editionprofil.php">Editer mon profil</a>
<a href="deconnexion.php">Se déconnecter </a>
<a href="../frame/Tchat.php">Vers le tchat </a>
<?php
}
?>
<?php
if(isset($erreur))
{
echo '<font color="red">'.$erreur.'</font>';
}
?>
</div>
</body>
</html>
<?php
}
?> |