Please start any new threads on our new site at We've got lots of great SQL Server experts to answer whatever question you can come up with.

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

SQL Server Forums
Profile | Active Topics | Members | Search | Forum FAQ
Save Password
Forgot your Password?

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Database User Priviledge error
 Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Starting Member

2 Posts

Posted - 04/24/2013 :  15:29:24  Show Profile  Reply with Quote
We have a database with two tables in it, members, and registrations. I'm using the same PHP and MySQL code to populate both tables that have basically the same rows of data.

The database was manually made, along with the database user in cPanel.

The registrations table is populating but when I try to run this code below to populate the members table it isn't working.....

$dbhost = '#';
$dbuser = '#';
$dbpass = '#';
$conn = mysql_connect($dbhost, $dbuser, $dbpass);
if(! $conn )
die('Could not connect: ' . mysql_error());
$sql = 'INSERT INTO members '.
'(event,venue, firstname) '.
'VALUES ( "test", "test", "test" )';

$retval = mysql_query( $sql, $conn );
if(! $retval )
die('Could not enter data: ' . mysql_error());
echo "Entered data successfully\n";

It gives me this error...

Could not enter data: INSERT command denied to user '#'@'' for table 'members'

I can't figure out how to fix this, any help is appreciated.

James K
Flowing Fount of Yak Knowledge

3873 Posts

Posted - 04/24/2013 :  15:35:55  Show Profile  Reply with Quote
This forum is for Microsoft SQL Server; so there would be very few, if any, experts on MySQL/PHP. You would get faster and better answers at PHP or MySql forum.
Go to Top of Page

Starting Member

2 Posts

Posted - 04/24/2013 :  16:06:46  Show Profile  Reply with Quote
Oh, okay,

Go to Top of Page
  Previous Topic Topic Next Topic  
 Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.04 seconds. Powered By: Snitz Forums 2000