I'm an iPhone developer, and I've just started out with PHP & mysql (making websites for others, and web services for my apps).
Whenever I hardcoded my username and password into a PHP file to connect to the database I felt a bit odd. Example:
$con = mysql_connect('localhost:8888','root','password');
I find this slightly awkward if I ever have to show code to anybody.
- Is this secure or good practice?
- Is there another way I should be connecting to the database?
I would be very grateful for any advice related to this issue.