Programming Tools
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsProgrammingProgramming Tools

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old July 16th, 2003, 04:20 AM
collins23 collins23 is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Location: kampala uganda
Posts: 19 collins23 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Unhappy code for sessions problem

this is the code u requested for.
am sorry for posting more than once i promise i won't do it again.

the file page2.php is in the php tutorial on authentication which i believe you have read.
here is my code

PHP Code:
<?include 'page2.php';?>



<html><head><title>my database</title></head>
<body topmargin=30 leftmargin=30 rightmargin=30>
..
..
</body></html

i left out the body which is basically contents of my file home.php.
let me explain my problem a little more .
without the include statement everything is fine.
the page shows properly but because i want to ensure that whoever is viewing home.php is an authenticated user i included page2.php at the top.
what happens when i login is that the login form login.html appears on top of my page and the rest that appears is the contents of home.php without the include statement.
to be abit more elaborative i don't want the login form to appear on top of my page since i already logged in so what can i do to restrict access to that page if not logged in and at the same time when i login i should not see the login form.

Reply With Quote
  #2  
Old July 16th, 2003, 06:57 AM
dhouston's Avatar
dhouston dhouston is offline
Contributing User
Dev Articles Beginner (1000 - 1499 posts)
 
Join Date: May 2003
Location: Tennessee
Posts: 1,355 dhouston User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 7
Send a message via ICQ to dhouston
Perform your login check. If it fails (if the user is not logged in), display the login form and exit so that the rest of hte page isn't displayed. Else display nothing and don't exit, so that the rest of the page is displayed.

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingProgramming Tools > code for sessions problem


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway
Stay green...Green IT