<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");
}
}
}
为什么它会立即失败。如果你能
,你甚至不会出现帮助.php index.php