altro quesito se possibile... ho lo stesso problema ma nella seconda pagina devo passare un valore non con il form ma da un url...
PAGINA 1
Codice PHP:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
</head>
<body background="images/sfondo.jpg">
<?php
$odbc_dns = "db_forum";
$odbc_userid = "";
$odbc_password = "";
$nomeutente = $_POST["user"];
$password = $_POST["pwd"];
$tipologia = $_POST["tipologia"];
$query1="SELECT Username, Password, Tipologia
FROM Utente
WHERE Username='" . $nomeutente . "' and
Password='" . $password . "' and
Tipologia='" . $tipologia . "'";
if ( !( $odbc_db = odbc_connect($odbc_dns, $odbc_userid, $odbc_password) ) )
die("Could not connect to ODBC data source $odbc_dns");
if ( !( $odbc_rs = odbc_do($odbc_db, $query1) ) )
die("Error executing query $query");
if($val=Odbc_Fetch_row($odbc_rs)){
session_start();
$_SESSION['type']=$tipologia;
$_SESSION['user']=$nomeutente;
$_SESSION['pass']=$password;
switch ($tipologia){
case 'Amministratore':
header("location:_private/menuamministratore.php");
exit;
break;
case 'Utente':
header("location:_private/menuutente.php");
exit;
break;
}
}
else $_SESSION['type']!=$tipologia;
header("location:Sessionescaduta.php");
?>
</body>
</html>
PAGINA 2
Codice PHP:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
</head>
<body background="../images/sfondo.jpg">
<p align="right">
<font face="Arno Pro Light Display" size="2">[url="logout.php"]Logout[/url]</font></p>
<p align="center">
[img]../images/ForumSystem.gif[/img]</p>
<table border="0" width="100%">
<tr>
<td align="center"><font face="Algerian" size="5">Menù Utente</font></td>
</tr>
<tr>
<td align="center"></td>
</tr>
<tr>
<td align="center"><font face="Algerian" size="4">[url="profilopersonale.php"]Modifica Profilo Personale[/url]</font></td>
</tr>
</table>
</body>
</html