Hi i'm trying to create a simple comment feature to and have an index.html
<html>
<head><title>Test Page</title></head>
<body>
<h2>Data Collection</h2><p>
<form action="comments.php" method="post">
Your Name: <input type="text" name="name"><br>
E-mail: <input type="text" name = "email"><br>
Location: <input type="text" name = "location"><br>
<input type="submit" value="Submit">
</form>
</body>
</html>
and a comment.php
<?
$name=$_POST['name'];
$email=$_POST['email'];
$location=$_POST['location'];
mysql_connect("localhost", "root", "password") or die(mysql_error());
mysql_select_db("table") or die(mysql_error());
mysql_query("INSERT INTO `data` VALUES ('$name', '$email', '$location')");
Print "Your information has been successfully added to the database.";
?>
I get the error "Can't connect to local MySQL server through socket '/tmp/mysql.sock' (111)"
I went in my.conf and the socket is pointed to /var/lib/mysql/mysql.sock and i tried copying the sock to /tmp but i still get this error. Is this a litespeed error or a php error?
<html>
<head><title>Test Page</title></head>
<body>
<h2>Data Collection</h2><p>
<form action="comments.php" method="post">
Your Name: <input type="text" name="name"><br>
E-mail: <input type="text" name = "email"><br>
Location: <input type="text" name = "location"><br>
<input type="submit" value="Submit">
</form>
</body>
</html>
and a comment.php
<?
$name=$_POST['name'];
$email=$_POST['email'];
$location=$_POST['location'];
mysql_connect("localhost", "root", "password") or die(mysql_error());
mysql_select_db("table") or die(mysql_error());
mysql_query("INSERT INTO `data` VALUES ('$name', '$email', '$location')");
Print "Your information has been successfully added to the database.";
?>
I get the error "Can't connect to local MySQL server through socket '/tmp/mysql.sock' (111)"
I went in my.conf and the socket is pointed to /var/lib/mysql/mysql.sock and i tried copying the sock to /tmp but i still get this error. Is this a litespeed error or a php error?