Enjoy an ad free experience by logging in. Not a member yet?
Register .
05-11-2011, 01:32 PM
PM User |
#1
New Coder
Join Date: Aug 2010
Location: Hamilton, New Zealand
Posts: 88
Thanks: 5
Thanked 4 Times in 4 Posts
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.
05-11-2011, 01:35 PM
PM User |
#2
Regular Coder
Join Date: Jul 2010
Location: Sheffield
Posts: 794
Thanks: 91
Thanked 18 Times in 18 Posts
Try putting the session_start(); (line 6x) at the VERY start, JUST after the opening <?php
Users who have thanked tomharto for this post:
05-11-2011, 01:38 PM
PM User |
#3
Supreme Master coder!
Join Date: Mar 2007
Location: N/A
Posts: 14,678
Thanks: 158
Thanked 2,182 Times in 2,169 Posts
Quote:
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?
__________________
Quote:
The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)
05-11-2011, 01:49 PM
PM User |
#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
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
05-11-2011, 01:51 PM
PM User |
#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.
05-11-2011, 02:07 PM
PM User |
#6
Supreme Master coder!
Join Date: Mar 2007
Location: N/A
Posts: 14,678
Thanks: 158
Thanked 2,182 Times in 2,169 Posts
Quote:
Originally Posted by
dpDesignz
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
@tomharto thanks heaps! That worked.
The error you've posted is an indication of a mismatched/missing curly brace!
__________________
Quote:
The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)
05-11-2011, 02:10 PM
PM User |
#7
Regular Coder
Join Date: Jul 2010
Location: Sheffield
Posts: 794
Thanks: 91
Thanked 18 Times in 18 Posts
No problem
. If i helped dont forget the thanks button :P
05-11-2011, 02:46 PM
PM User |
#8
Senior Coder
Join Date: Feb 2011
Location: Your Monitor
Posts: 3,503
Thanks: 45
Thanked 439 Times in 428 Posts
Quote:
Originally Posted by
dpDesignz
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
The error you've posted is an indication of a mismatched/missing curly brace!
Indeed. You might like to look at my recent
TIP
Jump To Top of Thread
Thread Tools
Rate This Thread
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
All times are GMT +1. The time now is 12:27 AM .
Advertisement
Log in to turn off these ads.