Help - Search - Members - Calendar
Full Version: Please Help
Zymic Webmaster Forums > Zymic Free Web Hosting > Databases & MySQL
Noobkiller
I need help connecting to my newly created database. I'm trying to use this code

CODE
<?php
require 'DB.php'
$db=DB::connect('databaseprogram://username:password@hostname/databasename');
if(DB::isError($db)){die("Can't connect: ".$db->getMessage());}
?>


but the only thing I can get is

QUOTE
Parse error: syntax error, unexpected T_VARIABLE in /www/vndv.com/n/o/o/noobkillertestsite/htdocs/test.php on line 9


please help me! Also, how do I upload my database to my webserver?
Andrew
Did you create DB.php?

Since its requiring that, and if you created, look on line 7 of DB.php for your error maybe.
Noobkiller
Here's another question, do I upload mysql database to my server, or do I simply connect to it using php?
Jacob
There has to be a DB.php and a database on the server for it to work.

Jacob.
Ed
This looks like it relies on PEAR's DB abstraction layer, it's not installed, you don't need it for a database connection though.

Check out the following link:
http://www.php.net/mysql-connect
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-2012 Invision Power Services, Inc.