Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Post New Thread Reply

Register GFY Rules Calendar Mark Forums Read
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed.

 
Thread Tools
Old 04-10-2004, 08:56 PM   #1
malakajoe
Confirmed User
 
Join Date: Feb 2003
Location: Sacramento
Posts: 1,751
PHP Help

I was hoping someone with PHP knowledge can help me here. Just learning, so probably a stupid question.

I am trying to set a global session variable from a sql select statement. But I am not getting anything passed.

Here is a snip of the code.

PHP Code:
$sql mysql_query("SELECT * FROM users WHERE email_address='$username' AND password='$password'");

while(
$row mysql_fetch_array($sql)){
    
$firstname=$row["firstname"];
    
$lastname=$row["lastname"]; 
    
$id=$row["ID"]; 
    
$code1=$row["code1"]; 
    
$code2=$row["code2"];
    
$code3=$row["code3"];
    
$email_address=$row["email_address"]; 
    } 

        
// Register session variables
session_register('first_name'); 
        
$_SESSION['first_name'] = $firstname
session_register('last_name'); 
        
$_SESSION['last_name'] = $lastname
session_register('email_address'); 
        
$_SESSION['email_address'] = $email_address;
session_register('username'); 
        
$_SESSION['username'] = $email_address;
session_register('code1'); 
        
$_SESSION['code1'] = $code1;
session_register('code2'); 
        
$_SESSION['code2'] = $code2;
session_register('code3'); 
        
$_SESSION['code3'] = $code3;
session_register('id'); 
        
$_SESSION['id'] = $id
ICQ me please if you can help or answer here.

ICQ #274397996

Thanks.
__________________
Selfpleasure.com for sale on auction. Closes on Tuesday March 11th at 9pm PST!!!!

Dirty enough to be good, but clean enough for everyone!
------------------------------------------------------------------

Moral Police - First graduating class coming soon! - Forcing our values across the internet
malakajoe is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-10-2004, 09:27 PM   #2
RK
Confirmed User
 
Join Date: Aug 2001
Location: In a Bunker
Posts: 868
Do you have globals enabled?
__________________
Does anyone look down here?
RK is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-10-2004, 09:42 PM   #3
delgato
Registered User
 
Join Date: Mar 2004
Posts: 25
php.net has good hahahahahahahahaation so RTFM =]

Look into the session handling functions.
__________________
<img src="http://mkugroup.ath.cx/krank.jpg">
delgato is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-10-2004, 09:47 PM   #4
malakajoe
Confirmed User
 
Join Date: Feb 2003
Location: Sacramento
Posts: 1,751
Thanks for everyones help.

I wasn't creating the session variables correctly at the beginning.

Also, was getting a PHP message on the bottom of every page about a warning with calling session variables.

But it is all working now.

__________________
Selfpleasure.com for sale on auction. Closes on Tuesday March 11th at 9pm PST!!!!

Dirty enough to be good, but clean enough for everyone!
------------------------------------------------------------------

Moral Police - First graduating class coming soon! - Forcing our values across the internet
malakajoe is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Post New Thread Reply
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >

Bookmarks
Thread Tools



Advertising inquiries - marketing at gfy dot com

Contact Admin - Advertise - GFY Rules - Top

©2000-, AI Media Network Inc



Powered by vBulletin
Copyright © 2000- Jelsoft Enterprises Limited.