Follow along with the video below to see how to install our site as a web app on your home screen.
Бележка: This feature may not be available in some browsers.
Meniak каза:Код:session_start(); if (($_SESSION['logged']) === true) { // Кода на страницата ти } else { header('Location: ../index.php'); }
session_start();
if (($_SESSION['logged']) === true) {
}
else
{
header('Location: ../index.php');
}
<?php
session_start();
if (($_SESSION['logged']) === true) {
?>
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>404 Not Found</title>
</head><body>
<h1>Not Found</h1>
<p>The requested URL /index.php was not found on this server.</p>
<p>Additionally, a 404 Not Found
error was encountered while trying to use an ErrorDocument to handle the request.</p>
<hr>
<address></address>
</body></html>
<?php
}
else
{
header('Location: index.php');
}
?>
Meniak каза:Искаш като напише някои патя до страницата ти ако тои не е логнат да го праща в началната страница ако не се лажа или?.
Код:<?php session_start(); if (($_SESSION['logged']) === true) { ?> <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> <html><head> <title>404 Not Found</title> </head><body> <h1>Not Found</h1> <p>The requested URL /index.php was not found on this server.</p> <p>Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.</p> <hr> <address></address> </body></html> <?php } else { header('Location: index.php'); } ?>
<?php
if(!$_SESSION[name]){
?>
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>404 Not Found</title>
</head><body>
<h1>Not Found</h1>
<p>The requested URL /index.php was not found on this server.</p>
<p>Additionally, a 404 Not Found
error was encountered while trying to use an ErrorDocument to handle the request.</p>
<hr>
<address></address>
</body></html>
<?php
} else {
header('Location: index.php');
}
?>