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 8 of 8
  1. #1
    New Coder
    Join Date
    Aug 2010
    Location
    Hamilton, New Zealand
    Posts
    88
    Thanks
    5
    Thanked 4 Times in 4 Posts

    Question PHP Login Script user logged in

    I'm using the PHP Login Script v2.0 and I want to make it on my index page, that when a user is logged in it shows some content, but if they're not logged in it shows something else. This is what I have so far, but I keep getting syntax errors: http://pastebin.com/RGBPpWHT.

    Can anyone help with this? I'm not sure what info is needed, but if you need more just let me know.

  2. #2
    Regular Coder
    Join Date
    Jul 2010
    Location
    Sheffield
    Posts
    827
    Thanks
    93
    Thanked 18 Times in 18 Posts
    Try putting the session_start(); (line 6x) at the VERY start, JUST after the opening <?php

  3. Users who have thanked tomharto for this post:

    dpDesignz (05-11-2011)

  4. #3
    Supreme Master coder! abduraooft's Avatar
    Join Date
    Mar 2007
    Location
    N/A
    Posts
    15,060
    Thanks
    165
    Thanked 2,250 Times in 2,237 Posts
    This is what I have so far, but I keep getting syntax errors:
    Could you please post the exact error and the code in that specified line, along with one or two lines adjacent to it?

  5. #4
    New Coder
    Join Date
    Aug 2010
    Location
    Hamilton, New Zealand
    Posts
    88
    Thanks
    5
    Thanked 4 Times in 4 Posts
    Quote Originally Posted by abduraooft View Post
    Could you please post the exact error and the code in that specified line, along with one or two lines adjacent to it?
    This is what I get:
    Parse error: syntax error, unexpected $end in /var/www/vhosts/dbnz.net.nz/httpdocs/index.php on line 311

  6. #5
    New Coder
    Join Date
    Aug 2010
    Location
    Hamilton, New Zealand
    Posts
    88
    Thanks
    5
    Thanked 4 Times in 4 Posts
    @tomharto thanks heaps! That worked.

  7. #6
    Supreme Master coder! abduraooft's Avatar
    Join Date
    Mar 2007
    Location
    N/A
    Posts
    15,060
    Thanks
    165
    Thanked 2,250 Times in 2,237 Posts
    Quote Originally Posted by dpDesignz View Post
    This is what I get:
    Parse error: syntax error, unexpected $end in /var/www/vhosts/dbnz.net.nz/httpdocs/index.php on line 311
    Quote Originally Posted by dpDesignz View Post
    @tomharto thanks heaps! That worked.
    The error you've posted is an indication of a mismatched/missing curly brace!

  8. #7
    Regular Coder
    Join Date
    Jul 2010
    Location
    Sheffield
    Posts
    827
    Thanks
    93
    Thanked 18 Times in 18 Posts
    No problem . If i helped dont forget the thanks button :P

  9. #8
    Master Coder
    Join Date
    Feb 2011
    Location
    Your Monitor
    Posts
    5,189
    Thanks
    113
    Thanked 610 Times in 596 Posts
    Quote Originally Posted by dpDesignz View Post
    This is what I get:
    Parse error: syntax error, unexpected $end in /var/www/vhosts/dbnz.net.nz/httpdocs/index.php on line 311
    Quote Originally Posted by abduraooft View Post
    The error you've posted is an indication of a mismatched/missing curly brace!
    Indeed. You might like to look at my recent TIP
    Quote Originally Posted by deathshadow View Post
    So seriously, loosen up that tie, let out the belt, and try relating to normal people on the street instead of the gentleman's club crowd.


 

Tags for this Thread

Posting Permissions

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