|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Stripslashes, addslashes, and MD5 vs Password
Hello got some general questions if someone can help.
What is the purpose of stripslashes and addslashes? I write multiple things to the database and do not have any problems not using these to built in functions. I have read them at http://www.php.net/manual/en/function.stripslashes.php but still do not understand. For my useres I have their password saved in the database as PASSWORD(pass) I have seen many people talking about MD5 is this the same? What is the difference? Functions PHP Code:
Thinking it would be simple I would do this. PHP Code:
Also here is my basic page layout. PHP Code:
If I do get a function to work to connect to the database would I just be able to add the connection to PHP Code:
__________________
Thanks, Attila http://www.glorynaspiration.com http://www.abitofthings.com |
|
#2
|
|||
|
|||
|
ok what you wanna do is this...
PHP Code:
then in your code, you can do this. PHP Code:
Provided dbconnect() is not already a function,...I dunno,..lol ![]() As for the Password thing. Storing passwords without some sort of encrypting can be ok...depends on what you wanna use it for and how paranoid you are. ![]() to me it is easy enough to just md5 the password before inserting into the db. If you wanna make the length smaller you can base64_enconde the md5'd password All sorts of things you can do ![]() PHP Code:
__________________
-- Jason Last edited by Taelo : January 9th, 2003 at 08:43 PM. |
|
#3
|
|||
|
|||
|
Thank you makes sence....I had that at one time just cou;dnt get it to work....I have the function burried a few layers deep the dbconnect.php function....Should it be in the same directory?
|
|
#4
|
|||
|
|||
|
up to you
just make sure if it is a lower directory you include the right path,...like ../dbconnect.php ![]() |
![]() |
| Viewing: Dev Articles Community Forums > Programming > General Programming Help > Stripslashes, addslashes, and MD5 vs Password |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|