kadamsurekha Posted March 9, 2007 Share Posted March 9, 2007 hello friends! i want to add my form details to the mysql database. i had done it with mysql_connect('localhost','root',''); but the error was localhost connection failed. i tried with my site domain as below <?php $link = mysql_connect('mydomain.com', 'root', ' '); if (!$link) { die('Could not connect: ' . mysql_error()); } mysql_close($link); ?> the error is Warning: mysql_connect() [function.mysql-connect]: Lost connection to MySQL server during query in /home/httpd/vhosts/mydomain.com/httpdocs/wel.php on line 99 Could not connect: Lost connection to MySQL server during query can any1 tell me wht is the pbm? n how to add form data to the database using mysql n php? thx Link to comment https://forums.phpfreaks.com/topic/41926-php-mysql-database-connection/ Share on other sites More sharing options...
JJohnsenDK Posted March 9, 2007 Share Posted March 9, 2007 what code is on line 99?? you also would want to select which table in the database you want to use... Link to comment https://forums.phpfreaks.com/topic/41926-php-mysql-database-connection/#findComment-203298 Share on other sites More sharing options...
rameshfaj Posted March 9, 2007 Share Posted March 9, 2007 mention the code on line 99 Link to comment https://forums.phpfreaks.com/topic/41926-php-mysql-database-connection/#findComment-203300 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.