I’m new to PHP. I’m doing some simple MySQL/webform work and it just feels strange to use my username and password directly in my php scripts. Is this a standard way to use a password, or should I use a more secure method? Thank you. Patrick
put your password and username in a file and store it in a directory not accessable from the web. (i.e. /usr/home/yourname) then include the file into your script. set up your file like this:
<?
$username = 'username'; $password = 'password';
?>
You could also just md5() the password. then when comparing, md5() the entered password and compare them.