having problem with my php codes
Posted by: deepskairali (117.215.194.---)
Date: January 01, 2014 08:12AM

hai

i found the following code when i am trying to connect my sql using wamp
Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'root@localhost'@'localhost' (using password: NO) in C:\wamp\www\lib\insert.php on line 5

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

Warning: mysql_select_db() [function.mysql-select-db]: A link to the server could not be established in C:\wamp\www\lib\insert.php on line 6

Warning: mysql_query() [function.mysql-query]: Access denied for user 'SYSTEM'@'localhost' (using password: NO) in C:\wamp\www\lib\insert.php on line 24

Warning: mysql_query() [function.mysql-query]: A link to the server could not be established in C:\wamp\www\lib\insert.php on line 24


and i am putting my codes too here hoping that i ll get help soon
<?php


mysql_connect("localhost","root@localhost"winking smiley;//database connection
mysql_select_db("mydb"winking smiley;

// Get values from form
$t = $_POST['title'];
$vn = $_POST['vno'];
$in = $_POST['ino'];
$d = $_POST['day'];
$mn = $_POST['month'];
$y = $_POST['year'];
$dat = $_POST['date'];
$r = $_POST['remark'];
//inserting data order
$order = "INSERT INTO magz
(title, volno, issueNo,day,month,year,date,remarks)
VALUES
('$t','$vn',$in,$d,$mn,$y,$dat,$r)";

//declare in the order variable
$result = mysql_query($order); //order executes
if($result)
{
echo("
Input data is succeed"winking smiley;
}



?>

Options: ReplyQuote
Re: having problem with my php codes
Posted by: stevenmartin99 (Moderator)
Date: January 01, 2014 10:33AM

Lethe username should be root ,not root@localhost

Steven Martin
stevenmartin99@gmail.com
stevenmartin99@hotmail.com
PampServer.com - [pampserver.com]

Options: ReplyQuote


Sorry, only registered users may post in this forum.