TalkPHP
 
 
Account Login
Latest Articles
» The basic usage of PHPTAL, a XML/XHTML template library for PHP
» Vulnerable methods and the areas they are commonly trusted in.
» Simple way to protect a form from bot
» The Basics On: How Session Stealing Works
» How to keep your forms from double posting data
IRC Channel
IRC Speech Bubble Join the friendly bunch on IRC...
(#TalkPHP on Freenode)

...Also available via a web interface.

See this thread for information on the TalkPHP Free Hugs Initiative™. Subject to availability.
Associates
Associates
CSS Tutorials
Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old 04-13-2005, 02:21 AM   #1 (permalink)
The Wanderer
 
Join Date: Apr 2005
Posts: 6
Thanks: 0
alcapone is on a distinguished road
Default need help

have a php game code where it keeps you logged in and the next person to go there will beable to use your name so keeps you logged in

help please
alcapone is offline  
Reply With Quote
Old 04-13-2005, 02:30 AM   #2 (permalink)
The Acquainted
 
Join Date: Mar 2005
Posts: 177
Thanks: 0
CreativeLogic is on a distinguished road
Default

I'm not sure exactly what you're saying? Can you explain further?
CreativeLogic is offline  
Reply With Quote
Old 04-13-2005, 02:33 AM   #3 (permalink)
The Wanderer
 
Join Date: Apr 2005
Posts: 6
Thanks: 0
alcapone is on a distinguished road
Default

ok lets say you go to my game and sign in to the game
ok me being that its my game im admin well if i logout when some one goes to the page all they need to do is hit play and they in the game under my account so it keeps you logged in the game at all times
alcapone is offline  
Reply With Quote
Old 04-13-2005, 02:40 AM   #4 (permalink)
The Acquainted
 
Join Date: Mar 2005
Posts: 177
Thanks: 0
CreativeLogic is on a distinguished road
Default

Are you using cookies, sessions or some other type of authentication and login management? Still need more information. I'm not sure how exactly you login or keep control of your users?
CreativeLogic is offline  
Reply With Quote
Old 04-13-2005, 03:04 AM   #5 (permalink)
The Wanderer
 
Join Date: Apr 2005
Posts: 6
Thanks: 0
alcapone is on a distinguished road
Default html.php file

ok here are the files
Attached Files
File Type: php funcs.php (2.2 KB, 194 views)
File Type: php html.php (17.3 KB, 183 views)
File Type: php index.php (7.6 KB, 170 views)
alcapone is offline  
Reply With Quote
Old 04-13-2005, 03:19 AM   #6 (permalink)
The Acquainted
 
Join Date: Mar 2005
Posts: 177
Thanks: 0
CreativeLogic is on a distinguished road
Default

I have no idea what the problem is. It none of those files does it set the $id variable. Although it uses it through the html.php file. Possibly attach setup.php file also. The only thing that I saw for user authentication was if the username and password were both set. Then it checked for a match via the database. It only set one cookie after that which to be honest, I have no reason why it did that. It set the 'code' held in the database in the cookie. First off, this is a bad procedure because many people could by pass this if they knew this 'code'. Anyways, I need to figure out where the $id variable is being set and setup.php is the only file I think that would have a possibility at this point, unless there are more files included in the setup.php file.

By the way, this script is full of SQL injection. If I were you I would pay a programmer or go through all the files yourself and try to fix those problems. You could run into a problem depending on your php installation. :(
CreativeLogic is offline  
Reply With Quote
Old 04-13-2005, 03:32 AM   #7 (permalink)
The Wanderer
 
Join Date: Apr 2005
Posts: 6
Thanks: 0
alcapone is on a distinguished road
Default setup.php

here is the setup.php file
alcapone is offline  
Reply With Quote
Old 04-13-2005, 03:34 AM   #8 (permalink)
The Acquainted
 
Join Date: Mar 2005
Posts: 177
Thanks: 0
CreativeLogic is on a distinguished road
Default

Ok, I deleted your file though as it includes things that you probably don't want everyone to know. I'm looking at the file now.
CreativeLogic is offline  
Reply With Quote
Old 04-13-2005, 03:38 AM   #9 (permalink)
The Acquainted
 
Join Date: Mar 2005
Posts: 177
Thanks: 0
CreativeLogic is on a distinguished road
Default

Ok, try upload this setup.php file and give me the url to the site. I'm going to run a few tests on it and see what is causing the problem.

Let me know when you download the file so I can delete it so no one steals your information.
CreativeLogic is offline  
Reply With Quote
Old 04-13-2005, 03:41 AM   #10 (permalink)
The Wanderer
 
Join Date: Apr 2005
Posts: 6
Thanks: 0
alcapone is on a distinguished road
Default

ok have file and uploaded

www.pimpvalley.com
alcapone is offline  
Reply With Quote
Old 04-13-2005, 03:43 AM   #11 (permalink)
The Acquainted
 
Join Date: Mar 2005
Posts: 177
Thanks: 0
CreativeLogic is on a distinguished road
Default

Ok, try this file now.

Again, let me know when you have it.
CreativeLogic is offline  
Reply With Quote
Old 04-13-2005, 03:49 AM   #12 (permalink)
The Acquainted
 
Join Date: Mar 2005
Posts: 177
Thanks: 0
CreativeLogic is on a distinguished road
Default

Ok, I noticed you uploaded it. Here's my last idea. This query is being ran when every someone goes to the site:
PHP Code:
SELECT id FROM $tab[userWHERE code='$trupimp' 
So basically it looks like they are being logged in as admin every time. Run this query in phpMyAdmin and tell me what it returns:
PHP Code:
SELECT code FROM users WHERE username 'admin' 
CreativeLogic is offline  
Reply With Quote
Old 04-13-2005, 03:51 AM   #13 (permalink)
The Acquainted
 
Join Date: Mar 2005
Posts: 177
Thanks: 0
CreativeLogic is on a distinguished road
Default

By the way here is your fixed setup.php file that you can reupload.
CreativeLogic is offline  
Reply With Quote
Old 04-13-2005, 04:01 AM   #14 (permalink)
The Wanderer
 
Join Date: Apr 2005
Posts: 6
Thanks: 0
alcapone is on a distinguished road
Default

sorry i added the name manually so no code that was the prob thank you so much four the help
alcapone is offline  
Reply With Quote
Old 04-13-2005, 04:01 AM   #15 (permalink)
The Acquainted
 
Join Date: Mar 2005
Posts: 177
Thanks: 0
CreativeLogic is on a distinguished road
Default

No problem. I noticed it was working correctly so yes, that was the problem! :)
CreativeLogic is offline  
Reply With Quote
Old 04-13-2005, 07:30 AM   #16 (permalink)
The Wanderer
 
Join Date: Apr 2005
Posts: 18
Thanks: 0
Veolus is on a distinguished road
Default

I can see your a really nice and helping guy, Ryan :)

If i have any problems with PHP i will be sure to post them at TalkPHP ;)
__________________
Please Join >> http://www.streetballforum.com :o
Veolus is offline  
Reply With Quote
Old 04-13-2005, 07:51 AM   #17 (permalink)
The Acquainted
 
Join Date: Mar 2005
Posts: 177
Thanks: 0
CreativeLogic is on a distinguished road
Default

Thanks for the kind words! :)
CreativeLogic is offline  
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
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

vB 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. The time now is 12:22 AM.

 
     

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Inactive Reminders By Icora Web Design