Delphi For PHP Forums       


Go Back   Delphi-PHP Forums > Programming > PHP - Code
Forum Jump Register FAQ Members List Downloads Search Today's Posts Mark Forums Read

PHP - Code PHP programming - Ask questions and help people with PHP code. If you are stuck and need help, this is where you ask for help.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 10th November 2008, 16:05
just Joined!
 
Join Date: Nov 2008
Posts: 2
cooljjj is on a distinguished road
Default From login.php to index.php passing vars

Hi,

I've developed a small database app. I have a login screen where a user types in his username and password. If validated I would like to pass the userid field to index.php and use that for my SQL queries. ie. User enters John as username
and Doe as his password therefore his userid = 2; when I get to index.php I would like to do something like $SQL = 'select * from basket where id = ' .$userid. Do I use the $Params variable? If so, how? or can I use some sort of global variable? Please help.

Thanks
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 10th November 2008, 16:15
405hp's Avatar
Firebug Fanatic
 
Join Date: Dec 2007
Location: State of Confusion
Posts: 3,268
405hp has a reputation beyond repute405hp has a reputation beyond repute405hp has a reputation beyond repute405hp has a reputation beyond repute405hp has a reputation beyond repute405hp has a reputation beyond repute405hp has a reputation beyond repute405hp has a reputation beyond repute405hp has a reputation beyond repute405hp has a reputation beyond repute405hp has a reputation beyond repute
Default

You have to use session or cookies or one of the built in login's like Developer's Guide :: Using BasicAuthentication - Delphi for PHP Documentation Wiki or the zend auth stuff.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 11th November 2008, 00:54
just Joined!
 
Join Date: Nov 2008
Posts: 2
cooljjj is on a distinguished road
Default

Thanks, I decided to go with $_SESSION. Works well.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On


All times are GMT +1. The time now is 10:39.




Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0 ©2009, Crawlability, Inc.
Copyright © 2004 - 2009, G&J Solutions Ltd. All Rights Reserved. terms of use