Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    New Coder
    Join Date
    Jun 2012
    Posts
    57
    Thanks
    13
    Thanked 0 Times in 0 Posts

    Question on log in system

    Ok, so if a user registers on my site, then how can I make it so that they are automatically logged in?

    I've tried setting something like:

    PHP Code:
    $_SESSION["Login"] = "Yes"
    on the registration page,

    and then specifying a username the same way, but the log in still doesn't work.




    Can anyone suggest a way to make this work?

  • #2
    Senior Coder
    Join Date
    Feb 2011
    Location
    Your Monitor
    Posts
    4,090
    Thanks
    51
    Thanked 506 Times in 493 Posts
    Quote Originally Posted by zingzing45 View Post
    but the log in still doesn't work.
    I get bored asking this..

    In what way, does it not work? Do you get a blank screen, an error message.. ?
    My helpful sig is on vacation trying to loose some weight. It got a bit fat and caused a few problems but it will be back at some point!

  • #3
    New Coder
    Join Date
    Jun 2012
    Posts
    57
    Thanks
    13
    Thanked 0 Times in 0 Posts
    Instead of showing your login information, like your username and points and stuff,

    it just shows the login and register tabs, and the input text boxes that appear when you're not logged in...

  • #4
    Senior Coder
    Join Date
    Feb 2011
    Location
    Your Monitor
    Posts
    4,090
    Thanks
    51
    Thanked 506 Times in 493 Posts
    You're still being very vague. YOU know exactly what you're talking about. The rest of us haven't got a clue. You've not shown any source code in php or html.

    Try showing us some code wrapped in [php] tags and we'll do what we can to help.
    My helpful sig is on vacation trying to loose some weight. It got a bit fat and caused a few problems but it will be back at some point!

  • #5
    New Coder
    Join Date
    Sep 2012
    Posts
    71
    Thanks
    0
    Thanked 8 Times in 8 Posts
    As above, more information, try breaking things down a bit...

    1) On page xyz.php they register using code on page wxy.php (if not the same).
    - more details... I do/don't redirect the user.

    2) Upon registration page xyz.php defines session variables a, b and c.
    - more details... I do/don't redirect the user.

    3) On page vwx.php I want the user details to display based on session variable a.
    - I do/don't know if the session variable is present on page vwx.php.
    - I do/don't know that user details are retrieved using the session variable.

    Give us the logical sequence, whats being done or attempted, and the things you have been able to figure out so far.
    Last edited by vroom; 09-08-2012 at 11:44 PM. Reason: spelling


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •