jeudi 25 janvier 2018

specific user view content of web php

I have this simple code

<?php
session_start();
?>
<head>
  <title>WWW</title>
</head>  
<body>  
<?php
  if($_SESSION['login']!=""){
?>
<header>
Welcome admin
</header>
<?php
{ else echo“Only admin can see this page“ } ?> 

But I dont know how to make only user called "Admin" to view this page and not other users. I have an SQL database of users with nick, password and email.




Aucun commentaire:

Enregistrer un commentaire