|
Web design and Programming Discuss website creation and other programming topics. |
|
Thread Tools | Search this Thread | Display Modes |
#1
|
||
|
More help
In this code what does -> do?
I simply want to select the password from sql, is there an easier way to do it? The password is encrypted though... PHP Code:
__________________
|
#2
|
||
|
did u make a class, or else that won't work...
|
#3
|
|||
|
Quote:
|
#4
|
||
|
Yes, it is part of a login script for Invisionboard.
__________________
|
#5
|
||
|
okay i remember what "->" does...it's fairly simple...classes are made for OOP (object oriented programming) in this your sending a varialbe, such as $DB to do something, perhaps
PHP Code:
PHP Code:
|
#6
|
||
|
Doing -> just means your referencing the function or variable in side the class.
PHP Code:
|
#7
|
||
|
you know what md5 is?
I can post the php files that I got it from if you'd like. I need to make it so my login can unencrypt the password that the board encrpyts. Or at leat compair the two so that it can validate a user.
__________________
|
#8
|
||
|
you cannot decrypt md5.. it's a 1 way encryption.
But you can match what the user input when logging in.. $username=addslashes($_POST['username']); $password=md5($_POST['password']); //will turn there submitted password to a md5 hash. $query=mysql_query("SELECT * FROM invision_users WHERE username='$username' AND password='$password' LIMIT 1");
__________________
04' Dodge SRT-4, Mopar Stage 3, 406whp/436wtq |
#9
|
||
|
Yeah I figured the login out. Now I have to figure out what I need to put in the session and what the session's name is for IPB
__________________
|
#10
|
||
|
IPB and all that is most likely confusing why don't you copy their login script and change needed varialbes? this would work great for registration and stuff on the site and not at the forums
|
#11
|
||
|
I think it is more complicated to do it your way Elite.
All I have to do is make it so it recognizes the same session.
__________________
|
#12
|
||
|
yes but also look through, most boards do this -- they have a function to grab userdata, simply do that then if username = guest (or whatever guest username is...) then don't let them do this or whatever
|
#13
|
||
|
Clear your cache and then go directly to your boards and login.. now open your temp files and you'll see the cookie.. Open it and the names of all the cookies placed by ipb are there .
__________________
04' Dodge SRT-4, Mopar Stage 3, 406whp/436wtq |
#14
|
||
|
Good idea, I'll check on that.
__________________
|
#15
|
||
|
Looks like what invision does is it creates a session and then stores the variables in a database. I still have no idea how to create the same session.
__________________
|
#16
|
||
|
Check session ID ...
|
#17
|
||
|
ehh, cant you use the session & cookie of the forum ?
|
#18
|
||
|
That's what he's trying to use bud
|
#19
|
||
|
like i said in my last post (in this thread) ... but seeings how nobody listens to me...
|
#20
|
|||
|
Quote:
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
|
|