Help - Search - Members - Calendar
Full Version: Canīt Connect Database And Php
Zymic Webmaster Forums > Zymic Free Web Hosting > Zymic Free Web Hosting - General Discussion & Help
Filipe_web
HI to all
I'm try to conect my web site to the data base but not working. I put the correct user, pass and data base...but i donīt know the right ip or if is "localhost".
And the php off my website don't work hunter.gif
Someone knows?

Ty =D
shubhra joshi
I don't know...that is what is confusing me. Right after I started having problems with that. The Newest Members widget on my site started doing weird stuff too. I'm sure the problems aren't related but the timing sure did correspond.
chumii.com
QUOTE(Filipe_web @ Jan 6 2012, 01:06 PM) *
HI to all
I'm try to conect my web site to the data base but not working. I put the correct user, pass and data base...but i donīt know the right ip or if is "localhost".
And the php off my website don't work hunter.gif
Someone knows?

Ty =D


Hey! laugh.gif

I connected using this:

define("DATABASE_HOST","localhost");
define("DATABASE_NAME","XXXX");
define("DATABASE_SERVER",DATABASE_HOST.":/".DATABASE_NAME);
define("DATABASE_USERNAME","123456_YYYY");
define("DATABASE_PASSWORD","ZZZZ");

$db_handler = mysql_connect(
DATABASE_SERVER,
DATABASE_USERNAME,
DATABASE_PASSWORD
) or die("Can't connect with the database: ".mysql_error()." (".mysql_errno().")");

Good luck!! cool.gif
ssfdre38
just go to http://zymickb.tk/index.php/MySQL and it will help you
chumii.com
QUOTE(chumii.com @ Jan 7 2012, 10:10 AM) *
Hey! laugh.gif

I connected using this:

define("DATABASE_HOST","localhost");
define("DATABASE_NAME","XXXX");
define("DATABASE_SERVER",DATABASE_HOST.":/".DATABASE_NAME);
define("DATABASE_USERNAME","123456_YYYY");
define("DATABASE_PASSWORD","ZZZZ");

$db_handler = mysql_connect(
DATABASE_SERVER,
DATABASE_USERNAME,
DATABASE_PASSWORD
) or die("Can't connect with the database: ".mysql_error()." (".mysql_errno().")");

Good luck!! cool.gif


I found you will also need this

// Select database
mysql_query("use ".DATABASE_NAME,$db_handler) or die("use database: ".mysql_error()." (".mysql_errno().")");

wacko.gif
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2013 Invision Power Services, Inc.