Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 having user name password system and hiding the password...
Index -> Programming, PHP -> PHP Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Homer_simpson




PostPosted: Fri Aug 01, 2003 9:06 pm   Post subject: having user name password system and hiding the password...

well u know that when some1 signs in with their username and password the url will change to this:
http://blah.com/blah.php?username=homer&password=homerpassword

but that is too obvious and who ever looks at the url will know what the password is... how can i hide the password or turn it into some sorta code?
Sponsor
Sponsor
Sponsor
sponsor
Amailer




PostPosted: Fri Aug 01, 2003 9:16 pm   Post subject: (No subject)

Crypt,
You could use that...
http://ca2.php.net/manual/en/function.crypt.php

But you shoudl always for safty reasons Encrypt the password.
You have a login form, with username and password.

The form posts to: login.php
and in there it does this...

(remember in the database...the password is already encrypted)

code:

$query = "SELECT username FROM LOGIN_TABLE
               WHERE  username = '$userid'
                AND user_password = md5('$password') ";
$result = mysql_query($query);


the md5();
encrypts the password given from the login form :/
And matches the encrypted password with the encrypted password in the mysql TABLE 'LOGIN_TABLE' and FIELD 'user_password'


Basicaly...what you can do is... when sendign the URL.. and getting it checked by a session. You can do this.

code:

$password = mb5($user_password);

echo "<a href=\"login.php?user_password=$password\"> err..what ?! </a>";

:p
Homer_simpson




PostPosted: Fri Aug 01, 2003 9:31 pm   Post subject: (No subject)

but isn't mb5 hackable?
Amailer




PostPosted: Fri Aug 01, 2003 9:34 pm   Post subject: (No subject)

PHPBB uses it

It is kinda unsafe because it did not change everytime.
Confused

But i think its the best to use...

http://termix-zero.ath.cx/pictures/test.php?ty=crypt&password= PASSWORD HERE

http://termix-zero.ath.cx/pictures/test.php?ty=md5&password=PASSWORD HERE
Homer_simpson




PostPosted: Sat Aug 02, 2003 3:07 am   Post subject: (No subject)

or i could make a password crypter of my own... the only question is how...
PaddyLong




PostPosted: Sat Aug 02, 2003 1:59 pm   Post subject: (No subject)

lol... look for encryption algorithms Razz http://www.google.com/search?q=encryption+algorithms Laughing

I'd just use md5 if I was you...
Amailer




PostPosted: Sat Aug 02, 2003 5:18 pm   Post subject: (No subject)

Hm ya, i use it always Very Happy
Display posts from previous:   
   Index -> Programming, PHP -> PHP Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 7 Posts ]
Jump to:   


Style:  
Search: