Professional Documents
Culture Documents
} else {
setcookie('test', 'value'); = defines a cookie to be sent along with the rest of the
HTTP headers. Like other headers, cookies must be sent before any output from
your script (this is a protocol restriction). This requires that you place calls to this
function prior to any output, including <html> and <head> tags as well as any
whitespace.
$self = $_SERVER['PHP_SELF']; = is an array containing information such as
headers, paths, and script locations. The entries in this array are created by the web
server. There is no guarantee that every web server will provide any of these;
servers may omit some, or provide others not listed here. That said, a large number
of these variables are accounted for in the CGI/1.1 specification, so you should be
able to expect those.
?>
<p>
<?php
}else{
echo 'unset'; = Unset a given variable
}
?>
<p>
Tekan refresh (F5);
<body>
<h1>selamat anda telah berhasil login</h1>
<form id="form1" name="form1" method="post"
enctype="multipart/form-data" action="index.php">
<?php
ini_set('display_errors', 1); = Sets the value of a configuration option
define('_VALID', 1); = Defines a named constant
init_login();
validate();
?>
<h3>Simulasi Halaman Admin</h3>
<p>
<a href ="?m=logout">Logout</a>
<p>
Menu-menu admin ada disini
</body>
</html>