Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

HTML Forum


You are currently viewing our HTML Forum as a guest. Please register to participate.
Login



Post a Project »

Find a Professional HTML Freelancer!

Find a Freelancer to help you with your HTML projects

FREE Outsourcing eBook!

Reply
Passsing session information between pages
Old 05-15-2006, 03:16 PM Passsing session information between pages
Experienced Talker

Posts: 47
Trades: 0
Some of my attempts to pass session information along as the user moves from page topage works correctly. And others fail for reasions I don't understand. All help appreciated.

Working code follows. The ipassed info is in the url as "?id=7" or other correct id number.

HTML Code:
href="/updatecontactscurrent_members.php ?id=<? echo $id; ?>">Update</a></font></td>
And the following code obtains the passed info correctly:

HTML Code:
$id=$_GET['id'];

The failing code is as follows: The passed info is in the url as "?UserID=<? echo $UserID;?>"

HTML Code:
<tr><td align left>
<a href="http://localhost/workinglogoutsession.php?UserID= <? echo $UserID;?>">Members Logout</a></td></tr>
And the following code obtains the passed info correctly but the info is wrong!

HTML Code:
$UserID=$_GET['UserID'];
Any ideas where I screwed up?

Frodocyber
Frodocyber is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 05-15-2006, 03:23 PM Re: Passsing session information between pages
mgraphic's Avatar
Truth Seeker

Latest Blog Post:
JAMISONTUNES
Posts: 2,918
Name: Keith Marshall
Location: Connecticut
Trades: 0
remove the space between UserID= <?

The browser will encode the space as %20 giving you wrong info
__________________

<mgraphic /> - I don't have a solution but I admire the problem.
mgraphic is offline
Reply With Quote
View Public Profile
 
Old 05-16-2006, 12:09 PM Re: Passsing session information between pages
Experienced Talker

Posts: 47
Trades: 0
Removing the spaces had no affect on the result. Are there any tutorials available specifically focused on navigation and site security? This sometimes works...sometimes doesn't... is driving me nuts!
Frodocyber is offline
Reply With Quote
View Public Profile
 
Old 05-16-2006, 12:15 PM Re: Passsing session information between pages
mgraphic's Avatar
Truth Seeker

Latest Blog Post:
JAMISONTUNES
Posts: 2,918
Name: Keith Marshall
Location: Connecticut
Trades: 0
Double check your passed vars, on the landing page write:

PHP Code:
print_r($_GET); 
This will display the entire contents of the #_GET vars, make sure is is the data you are desiring.
__________________

<mgraphic /> - I don't have a solution but I admire the problem.
mgraphic is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Passsing session information between pages
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.14509 seconds with 12 queries