Hello!
I'm using authentication and sessions to log in to an area of my site. I can log in fine, but when I try to use a script to add data, I get an error:
Warning: mysql_query(): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) in /home/www/url.com/admin/make_added.php on line 25
Warning: mysql_query(): A link to the server could not be established in /home/www/url.com/admin/make_added.php on line 25
Could not execute mysql query 1!
An excerpt from the script which posts data:
session_start();
if(!session_is_registered(user)){
header("location:login.php");
}
include ("config.php");
And my simple config.php:
$host="******";
$username="badgoat";
$password="******";
$db_name="badgoat";
$tbl_name="members";
What am I doing wrong?