Unable to run php mysql code

Status
Not open for further replies.

ravi_singh2973

New Member
Messages
4
Reaction score
0
Points
0
Hi,



I added contact page to my site but unable to submit page as I got following error.


URL: http://hanswahinisoftwares.x10.mx/contact.php

=========================Error===============================

Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'ravising_rvsingh'@'int.web6.vital.x10hosting.com' (using password: YES) in /home/ravising/public_html/contact.php on line 54

Warning: mysql_db_query(): supplied argument is not a valid MySQL-Link resource in /home/ravising/public_html/contact.php on line 57

Warning: mysql_close(): supplied argument is not a valid MySQL-Link resource in /home/ravising/public_html/contact.php on line 58

=======================================================



I am not sure what is the problem. can you please help me on this?

Below is the code I used.

$cnn=mysql_connect("localhost","ravising_rvsingh","*******");
$sql = "insert into Contacts (`ContactId`,`Name`,`Organization`,`Country`,`State`,`EmailId`,`Phone`,`Description`) values (1,\'ravi\',\'hanswahini\',\'India\',\'UP\',\'test@test.com\',\'1234567890\',\'east or west india the best\')\n"
. "";
mysql_db_query("ravising_Main",$sql,$cnn);
mysql_close($cnn);

Thanks

---------- Post added at 02:20 AM ---------- Previous post was at 12:07 AM ----------

Hi,



I added contact page to my site but unable to submit page as I got following error.


URL: http://hanswahinisoftwares.x10.mx/contact.php

=========================Error===============================

Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'ravising_rvsingh'@'int.web6.vital.x10hosting.com' (using password: YES) in /home/ravising/public_html/contact.php on line 54

Warning: mysql_db_query(): supplied argument is not a valid MySQL-Link resource in /home/ravising/public_html/contact.php on line 57

Warning: mysql_close(): supplied argument is not a valid MySQL-Link resource in /home/ravising/public_html/contact.php on line 58

=======================================================



I am not sure what is the problem. can you please help me on this?

Below is the code I used.

$cnn=mysql_connect("localhost","ravising_rvsingh","*******");
$sql = "insert into Contacts (`ContactId`,`Name`,`Organization`,`Country`,`State`,`EmailId`,`Phone`,`Description`) values (1,\'ravi\',\'hanswahini\',\'India\',\'UP\',\'test@test.com\',\'1234567890\',\'east or west india the best\')\n"
. "";
mysql_db_query("ravising_Main",$sql,$cnn);
mysql_close($cnn);

Thanks


After reading some posts I created new userid in my sql and my code worked.

Thanks
 
Last edited:
Status
Not open for further replies.
Top