/** * Establish connection to database and execute the query * @param query the query to be executed * @return $result the result of the query's execution */ function ConnectDB($query) { // Live $server = "101hair.com.my"; $username = "hairworks"; $password = "hair"; $database = "emerge_101haircare"; // Details of information needed to connect to database (LOCAL) // $server = "localhost"; //$username = "root"; // $password = ""; // $database = "101haircare"; // Connect to database mysql_connect($server, $username, $password) or die("Could not connect to database."); // Select database to use mysql_select_db($database) or die("Could not select database."); mysql_query("SET NAMES 'UTF8'"); // process the query to get result $result = mysql_query($query) or die ("Query failed to execute!" ."
Book a Free Consultation
Let us help you solve your hair problems!
Please fill all fields in order for us to revert back to you as soon as possible.
![]() Hello! My name is Papelli!!!
|