help needed
Posted by: revica (---.host-82-138-213-64.telecomplete.net)
Date: May 03, 2006 04:41PM

I have just installed WAMP5

I have just wrote a small script to connect to the server but i get the following errors

Warning: mysql_select_db() [function.mysql-select-db]: Access denied for user 'ODBC'@'localhost' (using password: NO) in C:\wamp\www\connection.php on line 19

Warning: mysql_select_db() [function.mysql-select-db]: A link to the server could not be established in C:\wamp\www\connection.php on line 19
Unable to select database!

This is the script below

--------------------------------------------------
connection.php
--------------------------------------------------

<?php

$host = "localhost";

$user = "************";

$pass = "************";

$db = "************";

// open connection

$connection = mysqli_connect($host, $user, $pass) or die ("Unable to connect!"winking smiley;

// select database

mysql_select_db($db) or die ("Unable to select database!"winking smiley;



?>

Re: help needed
Posted by: CyberSpatium (---.hsd1.or.comcast.net)
Date: May 03, 2006 07:49PM

change:

mysql_select_db($db) or die ("Unable to select database!"winking smiley;

to:

mysql_select_db($db, $connection) or die ("Unable to select database!"winking smiley;

more info:
[us2.php.net]

Sorry, only registered users may post in this forum.