Grazie mille a tutti, ho appena imparato una cosa nuova
Ho un ultima domanda, avendo questo codice:
Codice PHP:
<?php
switch ($_GET['nome']){
case "1":
include('***');
break;
case "2":
include('***');
break;
case "3":
include('***');
break;
case "4":
include('***');
break;
case "5":
include('***');
break;
case "6":
include('***');
break;
case "7":
include('***');
break;
case "8":
include('***');
break;
case "9":
include('***');
break;
case "10":
include('***');
break;
case "11":
include('***');
break;
case "12":
include('***');
break;
case "13":
include('***');
break;
case "14":
include('***');
break;
case "15":
include('***');
break;
case "16":
include('***');
break;
case "17":
include('***');
break;
case "18":
include('***');
break;
case "19":
include('***');
break;
default:
print "[...] mio codice HTML [...]";
break;
}
?>
non dovrebbe succedere niente se scrivo così vero?
Codice PHP:
<?php
$lingua = $_SERVER['HTTP_ACCEPT_LANGUAGE'];
switch($lingua){
default:
header("Location: it/");
break;
case 'en':
header("Location: en/");
break;
}
switch ($_GET['nome']){
case "1":
include('***');
break;
case "2":
include('***');
break;
case "3":
include('***');
break;
case "4":
include('***');
break;
case "5":
include('***');
break;
case "6":
include('***');
break;
case "7":
include('***');
break;
case "8":
include('***');
break;
case "9":
include('***');
break;
case "10":
include('***');
break;
case "11":
include('***');
break;
case "12":
include('***');
break;
case "13":
include('***');
break;
case "14":
include('***');
break;
case "15":
include('***');
break;
case "16":
include('***');
break;
case "17":
include('***');
break;
case "18":
include('***');
break;
case "19":
include('***');
break;
default:
print "[...] mio codice HTML [...]";
break;
}
?>
Scusate ma sono da poco che faccio pratica e studio PHP, siate clementi