Go Back   Novahq.net Forum > Computers > Web design and Programming
FAQ Community Calendar Today's Posts Search

Web design and Programming Discuss website creation and other programming topics.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 06-06-2005, 05:10 PM
atholon is offline atholon
"ath-hole"

Join Date: Jan 2003
Location: Failville.
Posts: 11,357

Send a message via MSN to atholon
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:
 if ( $DB->get_num_rows() )
 {
  
$member $DB->fetch_row();
  
  if ( empty(
$member['id']) or ($member['id'] == "") )
  {
   
$this->log_in_form'wrong_name' );
  }
  
  if (
$member['password'] != $password)
  {
   
$this->log_in_form'wrong_pass' );
  } 
__________________
Reply With Quote
  #2  
Old 06-06-2005, 07:42 PM
JonM is offline JonM
Registered User

Join Date: Jun 2004
Posts: 2,156

did u make a class, or else that won't work...
Reply With Quote
  #3  
Old 06-06-2005, 08:32 PM
DevilDog#1 is offline DevilDog#1

Join Date: Jul 2002
Posts: 7,040

Quote:
Originally posted by -Elite-
did u make a class, or else that won't work...
Told him that ...
__________________








Quote:
If I don't do that doesn't mean I can't - DD#1
Reply With Quote
  #4  
Old 06-06-2005, 08:57 PM
atholon is offline atholon
"ath-hole"

Join Date: Jan 2003
Location: Failville.
Posts: 11,357

Send a message via MSN to atholon
Yes, it is part of a login script for Invisionboard.
__________________
Reply With Quote
  #5  
Old 06-06-2005, 09:14 PM
JonM is offline JonM
Registered User

Join Date: Jun 2004
Posts: 2,156

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:
$DB = new Db_QUERY 
PHP Code:
$member $DB->function();  //is executing a function for a varialbe to go through... 
simple no?
Reply With Quote
  #6  
Old 06-06-2005, 09:23 PM
IcIshoot is offline IcIshoot

Join Date: Mar 2004
Location: Farmington Hills, MI
Posts: 1,473

Send a message via AIM to IcIshoot Send a message via MSN to IcIshoot Send a message via Yahoo to IcIshoot
Doing -> just means your referencing the function or variable in side the class.

PHP Code:
class test {
var 
$myvar "test string";

function 
md5string ($string) {

return 
md5($string);
}
}

$myclass = new test();

echo 
$myclass->myvar// outputs Test string

echo $myclass->md5string("Hi!"); //echos the md5 hash of "Hi!" 
IcI
Reply With Quote
  #7  
Old 06-06-2005, 10:44 PM
atholon is offline atholon
"ath-hole"

Join Date: Jan 2003
Location: Failville.
Posts: 11,357

Send a message via MSN to atholon
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.
__________________
Reply With Quote
  #8  
Old 06-06-2005, 11:50 PM
Scott is offline Scott
Scott's Avatar
AKA. Panther

Join Date: Sep 2001
Location: Minneapolis, MN
Posts: 10,924

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
Reply With Quote
  #9  
Old 06-06-2005, 11:55 PM
atholon is offline atholon
"ath-hole"

Join Date: Jan 2003
Location: Failville.
Posts: 11,357

Send a message via MSN to atholon
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
__________________
Reply With Quote
  #10  
Old 06-07-2005, 12:01 AM
JonM is offline JonM
Registered User

Join Date: Jun 2004
Posts: 2,156

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
Reply With Quote
  #11  
Old 06-07-2005, 12:05 AM
atholon is offline atholon
"ath-hole"

Join Date: Jan 2003
Location: Failville.
Posts: 11,357

Send a message via MSN to atholon
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.
__________________
Reply With Quote
  #12  
Old 06-07-2005, 12:11 AM
JonM is offline JonM
Registered User

Join Date: Jun 2004
Posts: 2,156

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
Reply With Quote
  #13  
Old 06-07-2005, 12:28 AM
Scott is offline Scott
Scott's Avatar
AKA. Panther

Join Date: Sep 2001
Location: Minneapolis, MN
Posts: 10,924

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
Reply With Quote
  #14  
Old 06-07-2005, 12:32 AM
atholon is offline atholon
"ath-hole"

Join Date: Jan 2003
Location: Failville.
Posts: 11,357

Send a message via MSN to atholon
Good idea, I'll check on that.
__________________
Reply With Quote
  #15  
Old 06-07-2005, 11:12 AM
atholon is offline atholon
"ath-hole"

Join Date: Jan 2003
Location: Failville.
Posts: 11,357

Send a message via MSN to atholon
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.
__________________
Reply With Quote
  #16  
Old 06-07-2005, 11:13 AM
DevilDog#1 is offline DevilDog#1

Join Date: Jul 2002
Posts: 7,040

Check session ID ...
__________________








Quote:
If I don't do that doesn't mean I can't - DD#1
Reply With Quote
  #17  
Old 06-07-2005, 11:25 AM
King is offline King
Registered User

Join Date: Jun 2004
Posts: 111

ehh, cant you use the session & cookie of the forum ?
__________________
www.sourcefreaks.com




Reply With Quote
  #18  
Old 06-07-2005, 11:31 AM
DevilDog#1 is offline DevilDog#1

Join Date: Jul 2002
Posts: 7,040

That's what he's trying to use bud
__________________








Quote:
If I don't do that doesn't mean I can't - DD#1
Reply With Quote
  #19  
Old 06-07-2005, 12:20 PM
JonM is offline JonM
Registered User

Join Date: Jun 2004
Posts: 2,156

like i said in my last post (in this thread) ... but seeings how nobody listens to me...
Reply With Quote
  #20  
Old 06-07-2005, 12:26 PM
DevilDog#1 is offline DevilDog#1

Join Date: Jul 2002
Posts: 7,040

Quote:
Originally posted by -Elite-
like i said in my last post (in this thread) ... but seeings how nobody listens to me...
Join the club bud. He seems to be zoned out nowadays.
__________________








Quote:
If I don't do that doesn't mean I can't - DD#1
Reply With Quote
Reply


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

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

Forum Jump


All times are GMT -5. The time now is 07:33 PM.




Powered by vBulletin®