Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <head>
- </head>
- <body>
- <?php
- $l = $_POST['login'];
- $h = $_POST['haslo'];
- $dsn = 'mysql:dbname=test;host=127.0.0.1';
- $user = 'root';
- $password = '';
- try {
- $dbh = new PDO($dsn, $user, $password);
- $sql = 'SELECT id, marka, model, kolor, poj_silnika FROM ela ORDER BY id';
- $stmt=$dbh->prepare('SELECT * klient WHERE ID_KLIENTA := ID_KLIENTA');
- $id=1;
- $stmt->$pdo->bindParam(':ID_KLIENTA', $id, PDO::PARAM_INT);
- $log = row['LOGIN'];
- $has = row['HASLO'];
- // $stmt->bindValue(':kolor','Srebrny',PDO::PARAM_STR);
- // $stmt->execute();
- // print $row['pojemnosc_silnika'] . "\n";
- } catch (PDOException $e) {
- echo 'Connection failed: ' . $e->getMessage();
- }
- if (($l == $log) && ($h == $has))
- {
- header("location: admin_panel.php");
- }
- else{
- header("location: login_error.php");
- }
- ?>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement