Ora ho sistemato in questo modo, ma ancora non mi fa quello che deve fare nonostante la sessione per mia fortuna adesso ci sia e quindi riesce a vederla
Codice PHP:
<?php
include("ctrlog.php");
$query="SELECT classe FROM personaggi WHERE creatore=".$_SESSION['nick']." AND pws=".$_SESSION['pws']."";
$result = mysql_query($query, $connect);
$row = mysql_fetch_array($result);
if ($row['classe']>0) {
/*A QUESTO PUNTO L'UTENTE è LOGGATO E VALIDO NE ANALIZZO LA CLASSE*/
switch($row['classe'])
{
case 'combattente':
header("Location: [url]http://frozen-world.org/registrazione/Combattente.php[/url]");
break;
case 'pilota':
header("Location: [url]http://frozen-world.org/registrazione/Pilota.php[/url]");
break;
case 'ricercatore':
header("Location: [url]http://frozen-world.org/registrazione/Ricercatore.php[/url]");
break;
case 'tecnico':
header("Location: [url]http://frozen-world.org/registrazione/Tecnico.php[/url]");
break;
case 'agente':
header("Location: [url]http://frozen-world.org/registrazione/Agente.php[/url]");
break;
case 'outlander':
header("Location: [url]http://frozen-world.org/registrazione/Outlander.php[/url]");
break;
case 'diplomatico':
header("Location: [url]http://frozen-world.org/registrazione/Intrattenitore.php[/url]");
break;
case 'manager':
header("Location: [url]http://frozen-world.org/registrazione/Manager.php[/url]");
default:
header("Location: [url]http://frozen-world.org/registrazione/Combattente.php[/url]");
}
}
else {
echo "ciao";
}
?>