Free Web Hosting Forum
(#1 (permalink))
Old
Junior Member
headmaintenance is on a distinguished road
 
Posts: 1
Join Date: Feb 2012
Default Error connecting to MySQL using php - 02-09-2012, 08:25 PM

<?php
mysql_connect("mysql6.000webhost.com","a4288581_ka lim","******") or die(mysql_error());
echo "Alhamdulillah connected to MySQL<br /><hr />";
?>

-------------------------------------------------------------------

when i run the above script in a file (test.php) i receive error.
Can i anyone help whats wrong with the code or is there anything i am not using...
Reply With Quote
Sponsored Links
(#2 (permalink))
Old
d3iti's Avatar
Super Moderator
d3iti is on a distinguished road
 
Posts: 4,606
Join Date: Jul 2009
Location: Spain
Default 02-09-2012, 09:18 PM

The username of the database seems not correct (it has a blank space) a4288581_ka lim.
Also would be good to know what the error is showing you MySQL.


Si este mensaje te ha servido de ayuda no dudes en pulsar sobre el botón karma
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Forum Jump



Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.5.2
vBulletin Skin developed by: vBStyles.com