PHP Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsProgramming LanguagesPHP Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old October 30th, 2002, 09:30 AM
bnow's Avatar
bnow bnow is offline
Charge into the Knight
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2002
Location: Orlando, FL
Posts: 276 bnow User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 12
How to pass session id to <iframe> source page?

How can I pass the session id to the iframe source page?
I have a page called upload.php that has an <iframe> tag that loads upload2.php page. I use the following code to validate the user in upload2.php:

PHP Code:
//This validates the user to see if they had logged in. If the had not then the user
//will be redirected to the login page.
if (!session_is_registered("TheVaildWord")){
    
header("Location: yourkickout.htm");
    exit;



Any ideas? Thanks.
__________________
Every man is a fool for at least five minutes every day; wisdom consists of not exceeding the limit.-- Elbert Hubbard

Reply With Quote
  #2  
Old October 30th, 2002, 05:07 PM
scoutt's Avatar
scoutt scoutt is offline
Contributing User
Dev Shed Novice (500 - 999 posts)
 
Join Date: Apr 2001
Posts: 645 scoutt Negative: is most likely a SPAMMER and a traitor to the cause. 
Time spent in forums: 16 sec
Reputation Power: 0
if you are on php version > 4.1 then you shouldn't be using session_is_registered() as it is deprecated.

also why do you want the session ID? if the iframe is on the ame site it should get the session info just fine if you start the page with sesion_start();

if the page is a regular html file then how do you plan on using the variable anyway?
__________________
Snippet Library

Reply With Quote
  #3  
Old October 31st, 2002, 07:44 AM
bnow's Avatar
bnow bnow is offline
Charge into the Knight
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2002
Location: Orlando, FL
Posts: 276 bnow User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 12
If session_is_registered() is depreciated then what should I be using to check to see if the session variable is set? I am running 4.2.2.

Reply With Quote
  #4  
Old October 31st, 2002, 08:21 AM
scoutt's Avatar
scoutt scoutt is offline
Contributing User
Dev Shed Novice (500 - 999 posts)
 
Join Date: Apr 2001
Posts: 645 scoutt Negative: is most likely a SPAMMER and a traitor to the cause. 
Time spent in forums: 16 sec
Reputation Power: 0
just use

if(isset($_SESSION['TheVaildWord'])){

and then you can get the session variable just like this in the frame page,

echo $_SESSION['TheVaildWord']

Reply With Quote
  #5  
Old October 31st, 2002, 11:07 AM
bnow's Avatar
bnow bnow is offline
Charge into the Knight
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2002
Location: Orlando, FL
Posts: 276 bnow User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 12
Thanks

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesPHP Development > How to pass session id to <iframe> source page?

Developer Shed Advertisers and Affiliates



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 | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap