l'erroe è nella query della function, tu hai messo
Codice PHP:
$estrazione_user = mysql_query("SELECT * FROM user WHERE id ='".$userid."' AND stato 1 LIMIT 1");
while($row = mysql_fetch_array($estrazione_user)){
non volevi mica mettere
Codice PHP:
$estrazione_user = mysql_query("SELECT * FROM user WHERE id ='".$userid."' AND stato=1 LIMIT 1");
while($row = mysql_fetch_array($estrazione_user)){
e poi, di solito i campi ID sono numerici, e tu hai messo $userid far apici il che vuole dire che MySQL presuppone che $userid sia un valore stringa: è giusto?