mysql_connect() error???

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
JellyFish
DevNet Resident
Posts: 1361
Joined: Tue Feb 14, 2006 7:18 pm
Location: San Diego, CA

mysql_connect() error???

Post by JellyFish »

Warning: mysql_connect(): Lost connection to MySQL server during query in /home/www/figaro.awardspace.com/linkcounter.php on line 2
Lost connection to MySQL server during query
I keep getting that error. I don't know what It means but hopfully someone knows on this forum.


Code: Select all

<? 
$connection = mysql_connect("70.86.229.146", "figaro_figaro", "password") or die(mysql_error()); 
$sql = "INSERT INTO linkcount (from, date) VALUES ('$_GET[from]', ' ')"; 
$result = mysql_query($sql, $connection) or die(mysql_error()); 
?> 
<html> 
<head> 
<meta http-equiv="refresh" content="1; url=http://www.arcadeground.com/?page=liquid" /> 
</head> 
</html>

Thanks and all help is appreciated.
Last edited by JellyFish on Thu Oct 05, 2006 2:11 pm, edited 1 time in total.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

NeoNmaN
Forum Newbie
Posts: 21
Joined: Mon Mar 27, 2006 4:08 am
Location: Denmark
Contact:

Post by NeoNmaN »

try this

Code: Select all

mysql_connect("host", "user", "pass"); 
mysql_select_db("database");


$sql = "INSERT INTO linkcount (from, date) VALUES ('$_GET[from]', ' ')";  
$result = mysql_query($sql);
i hob ist help you :)

and the next time you post DONT post the password, host and username to you mysql... ist relly risk for you self.

pm: if ist dont work soe i maby can help you agin :)
Post Reply