Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


[Help] PHP - populate page with field data

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
SXGuy
I post too much
Reputation: 0

Joined: 19 Sep 2006
Posts: 3551

PostPosted: Mon Dec 15, 2008 5:38 pm    Post subject: [Help] PHP - populate page with field data Reply with quote

Im quite noob with php and mysql so im unsure how to do this.

I have a feeling im prob missing some If's and is prob quite easy to do, but i wonder if anyone can help me as im unsure of the syntax.

Basic info.

I have a mysql database with the table name "members" which lists member usernames and passwords (md5 encrypted)
the fields are as follows

id - user - password - details

i have a login page which checks for user and password and then redirects you to a sucessful login page.

However, i wish to know how i can display "details" field on thew new page, but only the details relating to the original login user.

How would i edit my sucessful login page?

Code:
<?
session_start();
if(!session_is_registered(myusername)){
//code to add here
header("location:main_login.php");
}
?>

<html>
<body>
Details
</body>
</html>


Im sure it can be done just by getting the field data for "details" but im not sure what the syntax is.
And also, would it only show the details field that is connected to the username field only?
Back to top
View user's profile Send private message
sloppy
Expert Cheater
Reputation: 0

Joined: 17 Aug 2008
Posts: 123

PostPosted: Mon Dec 15, 2008 7:58 pm    Post subject: Reply with quote

Save the details field to a session variable in your main_login.php, then use echo $_SESSION['details']; to output the data. session_regsiter(), session_is_registered() and session_unregister() have been deprecated. Replace them with $_SESSION['variable'] = 'value', isset() and unset().
Back to top
View user's profile Send private message
SXGuy
I post too much
Reputation: 0

Joined: 19 Sep 2006
Posts: 3551

PostPosted: Tue Dec 16, 2008 4:30 am    Post subject: Reply with quote

ok thank you for that, i will try it Smile i wanted to stay away from loads of seperate pages for each user, and this should fix that.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites