Si l'ho usato, ma come faccio a richiamarlo sull'altra pagina?
Comunque ecco a te il codice se vuoi dargli un occhiata
codice:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<?
session_start();
include("config-riservato.php");
?>
<html>
<head>
<title>Login Pannello</title>
</head>
<body>
<center>
<div style="backcolor: #ffffff">
<center>
[img]Immagine.PNG[/img]
</center>
</div>
<table border="0" width="474" background="sfumaomogeneasb1.jpg" height="234">
<tbody>
<tr>
<td>
<center>
Per favore, inserisci i tuoi dati per effettuare l'accesso.
</center>
<?
function check($username,$password){
$username = addslashes($username);
$password = addslashes(md5($password));
connetti();
$r = mysql_query("SELECT * FROM pannellomod WHERE username = '$username' AND password = '$password'");
$n = mysql_num_rows($r);
if (!($n)){
return false;
}else{
return true;
}
}
function form_login(){
?>
<form id="login" method="post" action="<?=$PHP_SELF?>">
<div style="TEXT-ALIGN: center; MARGIN-LEFT: auto; MARGIN-RIGHT: auto">
Username: <input maxlength="255" name="username">
Password:<input maxlength="255" type="password" name="password">
<input value="Accedi" type="submit" name="OK">
</div>
</form>
<? }
if(isset($_POST["username"])){
if (check($_POST["username"],$_POST["password"])){
$_SESSION["username"] = $_POST["username"];
$_SESSION["password"] = $_POST["password"];
echo "<p align='center'> Hai appena effettuato l'accesso!
Accedi al pannello || Disconnetti</p>";
header("location: http://wikiforix.lwsserver.com/mod-pannel/pannello.php");
}else{
form_login();
}
}else{
form_login();
}
?>
</td>
</tr>
</tbody>
</table>
<div>
</div>
<div>
</div>
<div>
</div>
<div>
</div>
</center>
<div align="center">
<hr style="WIDTH: 79.42%; HEIGHT: 1px" color="#000000" size="0" width="79.42%">
</div>
<p align="center">Copyright © 2010 <a href="mailto:luigi.parziale@live.it">Luigi
Parziale (ixol)</a></p>
</body>
</html>