formulaire pour remplir des ticket de panne
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

20 lines
598 B

<?php
if (isset($_POST['login']) && isset($_POST['pwd'])) {
$bdd = new PDO('mysql:host=localhost;dbname=ticket;charset:utf8', 'root', '');
$reponse = $bdd->query("SELECT * FROM logins");
while ($line = $reponse->fetch()) {
if ($line[0] == $_POST['login'] && $line[1] == $_POST['pwd']) {
session_start();
$_SESSION['login'] = $_POST['login'];
$_SESSION['pwd'] = $_POST['pwd'];
header('location: ../prof/index.php');
}
}
$reponse->closeCursor();
}
echo '<meta http-equiv="refresh" content="0;URL=index.php">';
?>