Jump to content

error


spearchilduser

Recommended Posts

im getting a error i havent gotten since i started learnign php so i feel a bit stupid now

btu its

Warning: mysql_query() [function.mysql-query]: Access denied for user 'ODBC'@'localhost' (using password: NO) in E:\students\08023190\dancomp\detailschange.php on line 19

 

the code its refering to is:

19 $query = "SELECT * FROM customer WHERE username = '$username'";
20 echo $query;
21 $result1 = mysql_query($query);
22 $goo = $result;

 

echo query just prints out the select statement and the $result prints out nothing

 

The tables and attributes are spelt exaxctly as they are in the table

 

and the database connection is ok as theres one connection in a include file and it works for every other page

Link to comment
Share on other sites

but the connection is workign absolutely fine for every other page and its all using one include file so why would it be different for this page ?

 

The problem is connecting your DB so you must check if you don't close the connection in the process or something like that...

Link to comment
Share on other sites

Something tells me that your earlier 'white screen' thread and this one are for the same code and same problem, but this one differs in that you turned on error_reporting/display_errors so that you could see the error that was occurring at the msyql_query statement.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.