-2

コードの 4 行目で index.php ページに移動する必要があります ... 正しいコマンドは何ですか?

if($count==1){
    echo "Welcome...";
    #LINE 4
}
else {
    echo "Wrong Username or Password";
}
4

1 に答える 1

0

次のようなリダイレクトが必要だったと思います:

<?php 

if($count==1){
    echo "Welcome...";
    $golink = 'index.php';
   ?>

<html>
<head>
<title>A web page that points a browser to a different page after 2 seconds</title>
<meta http-equiv="refresh" content="2; URL=<?php  echo $golink; ?>">
<meta name="keywords" content="automatic redirection">
</head>
<body>
If your browser doesn't automatically go there within a few seconds, 
you may want to go to 
<a href="<?php echo $golink ?>">the destination</a> 
manually.
</body>
</html>

<?php
    } else {
echo "Wrong Username or Password";
?>

お役に立てれば !

于 2012-05-23T14:28:01.177 に答える