You are here: Newbie setting up php/mysql database « PHP SQL « IT news, forums, messages
Newbie setting up php/mysql database

Posted by it hates me on 04/03/07 23:42

Greetings

I am trying to setup a mysql database for a php script (OABS)

I've setup a database using my web site control panel (vDeck), and
created a database called:

myname_myname

The configuration script for OABS looks like this:

<?php
$flighttable = "OABS_flights";
$customertable = "OABS_customers";
$usertable = "OABS_user";
$offerstable = "OABS_offers";
$adstable = "OABS_adverts";
$sysname1 = "my company";
$maxRows_offers = 4; //The Maximum number of offers shown on the front
page
$domain = "mydomain.com"; //The domain where OABS is, e.g www.google.co.uk

$hostname_Database = "localhost";
$database_Database = "myname_myname";
$username_Database = "username_i_use_to_log_into_controlpanel";
$password_Database = "password_for_my_website_account";

//Do not edit below here
$Database = mysql_pconnect($hostname_Database, $username_Database,
$password_Database) or die(mysql_error());

$opts["hn"] = $hostname_Database;
$opts["un"] = $username_Database;
$opts["pw"] = $password_Database;
$opts["db"] = $database_Database;
$opts["tb"] = $flighttable;

?>


Have I configured the
$hostname_Database
$database_Database
$username_Database
$password_Database
fields correctly?

When I log into the install script for this PHP code I get the error:

No Database Selected


However, it has accepted my username and password correctly! (because
before when this was incorrect, it doesn't respond with no database
selected)

Can you please tell me how to point this php script to the mysql
database I have created using vDeck?

I'm sure this is a small problem to someone who knows what's going on!

Thank you very, very much!
Davy
kingdomoftonga@g mail

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация