Free Web Hosting Forum
(#1 (permalink))
Old
Member
Darryus is on a distinguished road
 
Posts: 32
Join Date: Aug 2011
Default can't connect to MySQL database - 09-17-2011, 04:55 AM

why my php script can connect to server ?

this is the connect test script
PHP Code:
<?php
$server
="mysql5.000.webhost.com";
$user "a4334067_tester";
$password "xxxxx";//my password is hidden

$id_mysql mysql_connect($server$user$password);
if(! 
$id_mysql)
die(
"can't connect to server");

print(
"You have been connected to server");



//the end of data reading
mysql_close($id_mysql);


?>
Reply With Quote
Sponsored Links
(#2 (permalink))
Old
Member
Passionless is on a distinguished road
 
Posts: 48
Join Date: Sep 2011
Default 09-17-2011, 05:37 AM

Hi,
You code works correctly. I tested it locally and it's fine. I think the problems you're experimenting are related to the ones described here.

BTW the DB just few seconds ago exploded or something. Check the attachments. Now it's fine, of course.
Attached Images
File Type: jpg Untitled.jpg (19.7 KB, 5 views)
File Type: jpg Untitleld.jpg (18.8 KB, 5 views)

Last edited by Passionless; 09-17-2011 at 05:44 AM. Reason: Fixed attachments.
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