if($_POST['user_admin'] = 0){ $acct_type = "a standard"; }
elseif($_POST['user_admin'] = 1){ $acct_type = "an administrator"; }
echo $acct_type;
echo $_POST['user_admin'];
Sia $_POST['user_admin']
è 0 o 1, $acct_type
restituisce ancora "un amministratore" Perché?
Sostituire '=' con '' == .... anche guardare http://www.php.net /manual/en/language.operators.comparison.php – Baba
possibile duplicato di [I 3 diversi uguali] (http://stackoverflow.com/questions/2063480/the-3-different-equals) – mario
Grazie! A volte ti manca qualcosa dopo averla fissata per 10 minuti ... – GiantDuck