|
Posted by Lee David on 06/06/05 03:46
Here is the warning:
Warning: mysql_connect(): Access denied for user: 'root@localhost' (Using
password: NO) in /home/u1/mokenabarber/html/SQL_Notice_Add.inc on line 19
Access denied for user: 'root@localhost' (Using password: NO)
Here is line 19 (and there abouts):
$id = $_POST[id];
$msg = $_POST[msg];
$name_connect = mysql_connect($cont, $user, $pwrd) or die(mysql_error());
$db_connect = mysql_select_db($name_db, $name_connect) or
die(mysql_error());
$name... is line 19.
"Oli Filth" <catch@olifilth.co.uk> wrote in message
news:K8Moe.10214$cN2.2567@newsfe4-gui.ntli.net...
> Lee David said the following on 06/06/2005 00:36:
>> Here is "SQL_A_Connect.inc"
>> // database connection include;
>> $user = "me";
>> $pwrd = "password";
>> $cont = "localhost";
>> $name_db = "database";
>> // end include;
>>
>> Here is one of the pages I'd like to call it "SQL_Notice_Add.inc":
>> <?php
>> if (isset($_POST[postaction]))
>> {
>> include("SQL_A_Connect.inc");
>>
>> $name_table = "notices";
>>
>> $time = date("Y-m-d h:m:s", time());
>> $time2 = $_POST[exp];
>> $time2 = ($time2 * 24 * 60 * 60) + time();
>> $time2 = date("Y-m-d h:m:s", $time2);
>> $id = $_POST[id];
>> $msg = $_POST[msg];
>>
>> and here is the page that has that include in it (SQL_Notice.php):
>> <td width="80%">
>> <?php
>> include("SQL_Notice_" . $act . ".inc");
>> ?>
>> </td>
>>
>> If the connection information include isn't there and the raw code it, it
>> works just find.
>>
>
> Where are you performing the SQL query that causes the error?
>
> --
> Oli
Navigation:
[Reply to this message]
|