php - Saving a USER preference variable after logout -
in project need save information user if has submitted form. doing saving in $_session[]
variable when user submit form saved in session variable , writing if(!isset($_session['page']))
restrict user visiting page when logout whole session destroyed. once again able register user has register, how block user re-registering form
when form submitted set $_session['personal_datas']=1;
when user revisit form after submitting
i check
<?php if(!isset($_session['personal_datas'])): ?> //display form <?php else: ?> <div class="well"> have submitted form </div> <?php endif; ?>
but when logout revisit page displays same unfilled form
how block user re-registering after re-login?
if there unique user enters form (such username or personal identification number) store in database , every time form submitted check username (or whatever) provided not in database.
otherwise there no way of permanently blocking user submitting form again. coockies can deleted (and browser specific). ip-adresses not constant , many users can have same ip.
Comments
Post a Comment