0
<?php
	$conn = mysql_connect("localhost","rentwall_rentwall",")X7zlBx)XgZ5")
	 or die ("Could not connect MySQL");
	mysql_select_db('rentwall_rentwall',$conn) or die ("Could not open database");
function post($postname)
{
	$posted = mysql_real_escape_string($postname);
	return $posted;
}
?>

Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'rentwall_rentwall'@'localhost' (using password: YES) in C:\wamp\www\site2\db.php on line 3
Could not connect MySQL

please someone help me with this i am not connecting with database
thanks in advance

Edited by Ezzaral: Added code tags. Please use them to format any code that you post.

3
Contributors
3
Replies
6
Views
5 Years
Discussion Span
Last Post by akhtar.ali803
0

I don't know why you would make your password )X7zlBx)XgZ5 ... My only suggestion is to use the root user and no password.

$conn = mysql_connect("localhost","root","");
0

This problem is not related to setting up password or that database connection is not established.

If someone come accross with this kind of problem I solved this by goinig into following steps:

Wamserver-->click on wampserver-->PHP-->php.ini file-->"ON" the short php tag

Always keep the short php tag "on" in php.ini file


Enjoy

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.