Possible Duplicate:
How to safely store a password inside PHP code?
So this is the scenario I have an C# program. It will send the Serial Number to my website. (eg: www.example.com/LicenseCheck.php) lets say it sent 1234-1234-1234 as serial.
The licenseCheck.php will then connect to my mysql:
<?php
$username = "your_name";
$password = "your_password";
$hostname = "localhost";
//connection to the database
$dbhandle = mysql_connect($hostname, $username, $password)
or die("Unable to connect to MySQL");
echo "Connected to MySQL<br>";
?>
then it will do a "select" from valid serial table and if the license exist in the table then that means it's a valid serial.
Basically, what im trying to find what would be a good way to approach this. I'm mostly worried about where to store the "Username", "Password". basically I will only have one user who will only have the read permission.
I would like to hide the username and password as best as possible and would like to approach this in a secure way.
What do I mean by "Secure"? Just a way that would keep unauthorized users from getting into my my databasae.
Thanks for all the help.