Patriot Posted February 8, 2008 Share Posted February 8, 2008 Thanks for looking. I have the following questions. QUESTION 1: I usually just use session variables, but I have decided to use cookies this time. Should I encrypt the password and username of the user before I store it as a cookie? What is the best way to destroy a cookie? QUESTION 2: How can I make the URL have a default variable such as "testsite.com/jon" where it will connect to the database and pull up information about a person named jon as opposed to making the url "testsite.com/?username=jon"? Thanks! Gil Link to comment https://forums.phpfreaks.com/topic/90112-question-about-cookies-and-a-question-about-urls-please-help/ Share on other sites More sharing options...
amites Posted February 8, 2008 Share Posted February 8, 2008 Q1: depends on how secure you want everything to be, make it expire quickly or send a command to have it kill itself Q2: mod_rewrite these are not PHP questions, please try the appropriate boards for non-PHP questions Link to comment https://forums.phpfreaks.com/topic/90112-question-about-cookies-and-a-question-about-urls-please-help/#findComment-462127 Share on other sites More sharing options...
revraz Posted February 8, 2008 Share Posted February 8, 2008 PW should always be hashed or encrypted. Hashing the username wouldn't be a bad idea either and don't use normal username or password as the cookie name. You just set it with a time in the past and it will expire and destroy. Link to comment https://forums.phpfreaks.com/topic/90112-question-about-cookies-and-a-question-about-urls-please-help/#findComment-462132 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.