0
<form>
            Felhasználó: <input type="text" value="<?php $name ?>" ><br>
            Jelszó: <input type="password" value="<?php $pw ?>" ><br>
            <input type="submit" value="Submit" onclick="<?php Login::log($name, $pw) ?>"> 
        </form>
<?php

require_once 'letzgo.php';
require_once 'fail.php';
class Login {
    public function log($name, $pw){
        if($name    ==  "Kila"  &&  $pw ==  "asd"){
            $url = 'letzgo.php';
            header( "Location: $url" );
        }
        else{
            $url    =   'fail.php';
            header( "Location: $url");
        }
    }
}

Why is it going instantly to fail.php index.php not even showing up pls help if you can

Kila
  • 1

0 Answers0