I am adding some database driven functionality to my web site and will need a php script like to sample below to connect to the database. I have found some solutions for protecting the password by storing it in a file outside the web directory. But my web-hosting is a shared linux account @ Go Daddy and I don't appear to have access outside the root. Any suggestions for how I can secure the password?
Thanks
Gary
<?php
$link = mysql_connect(' localhost', 'mysql_user', 'mysql_password ');
if (!$link) {
die('Could not connect: ' . mysql_error());
}
echo 'Connected successfully';.
mysql_close($li nk);
?>
Thanks
Gary
<?php
$link = mysql_connect(' localhost', 'mysql_user', 'mysql_password ');
if (!$link) {
die('Could not connect: ' . mysql_error());
}
echo 'Connected successfully';.
mysql_close($li nk);
?>
Comment