Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php $db = new PDO('mysql:host=10.11.1.23;hostname=dnergoux', 'dnergoux', 'bts') ?>
- <html>
- <body>
- ID : <input type = "text" name = "id"><br/>
- Password : <input type = "password" name = "mdp"><br/>
- <input type = "submit" value = "Connexion">
- </body>
- </html>
- <?php
- header('Content:type: text/html; charset=utf-8');
- $id = $_POST['id'];
- $psw = $_POST['mdp'];
- $sql = "SELECT * FROM SIO1_UTILISATEUR";
- $select_users = $db->query($sql);
- $user = $select_users->fectchAll();
- if($user)
- {
- echo "Vous êtes connecté.";
- }
- else
- {
- echo "Ce compte n'est pas enregistré, ou vos identifiants ne sont pas valides.";
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement