Managing Users with PHP Sessions and MySQL
hi folks
i read kevin yank's article Managing Users with PHP Sessions and MySQL, it is very interesting but i have one problem.
kevin says to use a php.ini file to include certain bits of code. i have spoken with my hosting company and they say they dont allow me access to the php.ini file on the server but i can create an .htaccess file. is there a way to achieve the same results using .htaccess instead?
thanks
A
Storing Passwords in a MySQL Database
Hi all,
I just read Kevin Yank's article on managing users with PHP and MySQL, and have one question.
Kevin says,
Quote:
Of course, you can't store the passwords encrypted using MySQL's PASSWORD function if you want to implement this feature (since PASSWORD is a one-way operation that cannot be reversed).
http://www.webmasterbase.com/article/319/119
So how can I encrypt users' passwords but then be able to "un-encrypt" them to email them to the user in case they forget their passwords?
Thanks,
Corbb
Re: Storing Passwords in a MySQL Database
Quote:
Originally posted by JustForWebmasters
Hi all,
I just read Kevin Yank's article on managing users with PHP and MySQL, and have one question.
Kevin says,So how can I encrypt users' passwords but then be able to "un-encrypt" them to email them to the user in case they forget their passwords?
Thanks,
Corbb
You don't have to. If they can remember their username then you can have a "reset your password" email sent to their registered address with a link to a form that carries out an update, without ever reading the data...
Where do I reference the database name?
I like the article...but I was unable to figure out where I add the db name?
I appreciate any help on this...Thanks
Re: Where do I reference the database name?
Now I'm getting:
Warning: Cannot send session cache limiter - headers already sent (output started at /home/mysite/public_html/php/accesscontrol.php:7) in /home/mysite/public_html/php/accesscontrol.php on line 12
in
accesscontrol.php
and
signup.php
I am using
dbConnect("db_name");
instead of Kevin's original
dbConnect("sessions");
Line 7 starts as fllows
<?php // accesscontrol.php
include("common.php");
include("db.php");
session_start();
if(!isset($uid)) {
php?>
SO line 12 is
session_start();
I am confused...Yes I am...Help! Thank You!
Quote:
Originally posted by UncleSam
I like the article...but I was unable to figure out where I add the db name?
I appreciate any help on this...Thanks