Dynadot Aftermarket: discover domain gems worth investing in. Visit our aftermarket.

[Resolved] Php post to Mysql

SpaceshipSpaceship
SpaceshipSpaceship
Namecheap AuctionsNamecheap Auctions
Watch
Impact
0
php post to mysql

Im having trouble connecting to my database using the code:

$link = mysql_connect('example.com:3307', 'mysql_user', 'mysql_password');
if (!$link) {
die('Could not connect: ' . mysql_error());
}
echo 'Connected successfully';
mysql_close($link);

Any idea why I cannot connect to the database?
 
0
Close
The views expressed on this page by users and staff are their own, not those of NamePros.
GoDaddyGoDaddy
what is the error message that you receive?

solved via chat. He was using a fully qualified domain instead of localhost when connecting.
 
0
Close
Thanks for the post upon resolution. I hate looking through forums to see someone just say "SOLVED". It doesn't help anyone. These forums are archives for many problems that can be solved if everyone does what you just did.
 
0
Close
DomainEasy: flexible LTO options. Close more domain deals with financing.

We're social

Escrow.com
Spaceship
Domain Recover
CryptoExchange.com

NamePros updates

Filters for activity feeds
Your news feed, Latest activity, and the activity tab on profiles now have filter buttons: All, Posts, Quick replies, and Other. Your...
AIVikings
Catchy
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back