Salve. Ho usato switch per definire alcune azioni da fare. Il problema è che default non funziona. Le variabili che ho definito mi danno un errore che dice che non sono definite.
Questo è il codice
codice:
switch ($_GET["op"])
{
case 'save':
$action = 'op=save';
$title = 'Inserisci materiale';
$value = 'Inserisci';
include_once ("functions/function_insert.inc.php");
break;
case 'delete':
include_once ("functions/function_delete.inc.php");
break;
case 'edit':
include_once ("functions/function_edit.inc.php");
break;
default:
$action = 'op=save';
$title = 'Inserisci materiale';
$value = 'Inserisci';
include_once ("functions/function_insert.inc.php");
break;
}