some help please!! Warning: mysql_fetch_array(): suppl

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

dandare
Forum Commoner
Posts: 26
Joined: Wed Jul 26, 2006 7:56 am
Location: London

Post by dandare »

ok i have tried a third name and this seems to work :?

from Everah's test code he gave me:

Code: Select all

<?php
$dbhost = 'localhost';
$dbuser = 'name';
$dbpass = 'password';

if (!$dbc = mysql_connect($dbhost, $dbuser, $dbpass))
{
    die('Could not establish a connection: ' . mysql_error());
}
else
{
    echo '<p>We are in!</p>';
}

$dbname = 'mechacol_UEL';
if (!mysql_select_db($dbname))
{
    die('Could not get the database: ' . mysql_error());
}
else
{
    echo '<p>We have a DB too!</p>';
}
?>

i get back

We are in!
We have a DB too!
Error connecting to mysql
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Post by RobertGonzalez »

It sounds like a password type conflict between the MySQL client API version and the MySQL server. When you added a new user and tested that user, did you make sure to give the user the appropriate persmissions to interact with the database? That is kind of important too.

Is this setup on a dedicated server or virtual server.
dandare
Forum Commoner
Posts: 26
Joined: Wed Jul 26, 2006 7:56 am
Location: London

Post by dandare »

I gave the new user all permissions

as it is part of my project, it is set up on a server which i already had, which i will use for a website in future.

You can view it from this location
http://www.mechacollective.com/test.php

or the original login form i am working on
http://www.mechacollective.com/login.php
Post Reply