Salve
premetto di aver letto la pillola sui cookies ma c'ho capito poco o nulla...
ho un guestbbok dove vorrei che il visitatore una volta lasciato il suo nome e la sua mail trovi i campi compilati al suo prossimo passaggio...
questa è la porzione di codice che ho fatto per il file sing.php dove viene lasciato il messaggio, le ultime due righe sono state create appunto per un cookie che ricordi "nome" e "email", ma se per la prima tutto funziona a dovere lo stesso non vale per la seconda... e pure le righe sono uguali, come mai?
codice:
$gb_fullname = format_entries($gb_fullname);
$gb_fullname = format_entrylength($gb_fullname, 20);
$gb_sex = format_entries($gb_sex);
$gb_sex = format_entrylength($gb_sex, 6);
$gb_location = format_entries($gb_location);
$gb_location = format_entrylength($gb_location, 20);
$gb_url = format_entries($gb_url);
$gb_url = format_entrylength($gb_url, 100);
$gb_email = format_entries($gb_email);
$gb_email = format_entrylength($gb_email, 50);
$gb_entry_text = format_entries($gb_entry_text);
$gb_entry_text = format_wordlength($gb_entry_text);
$gb_comment_text = format_entries($gb_comment_text);
$gb_comment_text = format_wordlength($gb_comment_text);
$gb_mess_brand = format_entries($gb_mess_brand);
$gb_mess_brand = format_entrylength($gb_mess_brand, 20);
$gb_mess_nick = format_entries($gb_mess_nick);
$gb_mess_nick = format_entrylength($gb_mess_nick, 15);
$gb_user_pass = md5(session_id() . rand(1, 999) . time());
setcookie("u2vsmrboh[name]", $gb_fullname,time()+1296000, "/guestbook");
setcookie("u2vsmrboh[email]", $gb_email,time()+1296000, "/guestbook");
grazie mille
MrBoh