Dear Sir/madam,
I have a problem which I don't seem to be able to resolve, so I hope you
can.
I have a simple html form which 'posts' variables to the following
script...
---
?php
$username=***;
$password=***;
$database=***;
$name =
RAFMTD (Ian) wrote:
Dear Sir/madam,
I have a problem which I don't seem to be able to resolve, so I hope you
can.
I have a simple html form which 'posts' variables to the following
script...
---
?php
$username=***;
$password=***;
$database=***;
RAFMTD (Ian) wrote:
...
$name = mysql_real_escape_string ($_POST['name']);
...
mysql_connect(humbug,$username,$password);
...
the script fails with the following report Warning:
mysql_real_escape_string(): Can't connect to local MySQL server through
socket '/var/run/mysqld/mysqld.sock'
It should be like this:
?php
$username=***;
$password=***;
$database=***;
mysql_connect(humbug,$username,$password);
@mysql_select_db($database) or die( Unable to select database);
$name = mysql_real_escape_string($_POST['name']);
$email = mysql_real_escape_string($_POST['email']);
$comments
4 matches
Mail list logo