ziedinjsh Posted July 12, 2011 Report Share Posted July 12, 2011 Man ir šādi: iekš logina (ja viss ir pareizi) session_start(); session_register("email"); header("location:../index.php"); un lai atpazītu ka ir ielogojies session_start(); if($_SESSION['email']){ echo "esmu iekšā"; }else{ echo "neesmu"; } it kā viss strādā, bet vai tā būtu pareizi!? Quote Link to comment Share on other sites More sharing options...
briedis Posted July 12, 2011 Report Share Posted July 12, 2011 (edited) Pārlasi manuāli http://php.net/manual/en/function.session-register.php Edited July 12, 2011 by briedis Quote Link to comment Share on other sites More sharing options...
daGrevis Posted July 12, 2011 Report Share Posted July 12, 2011 Neesmu nekad izmantojis tādu session_register()... Tev ar' nevajag. Quote Link to comment Share on other sites More sharing options...
Southwind* Posted July 12, 2011 Report Share Posted July 12, 2011 (edited) Negribēju taisīt jaunu topiku paprasīšu tepat .. ;D Karo4 ja es sesijās reģistrēju lietotāja ID es velāk pēc tā ID varēšu nolasīt datus no datubāzes? par viņu? Edited July 12, 2011 by Southwind* Quote Link to comment Share on other sites More sharing options...
daGrevis Posted July 12, 2011 Report Share Posted July 12, 2011 Sesijā nekas nav jāreģistrē! Tur vari tur saglabāt kaut ko, mierīgi... $_SESSION['user_id'] = 33; Pēc tam... kāpēc gan nē? $username = get_username_from_id($_SESSION['user_id']); Quote Link to comment Share on other sites More sharing options...
Southwind* Posted July 12, 2011 Report Share Posted July 12, 2011 =) paldies , cenšos , mācos Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.