[PHP] Excluding apostrophe's

2006-12-22 Thread RAFMTD \(Ian\)
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 =

Re: [PHP] Excluding apostrophe's

2006-12-22 Thread Stut
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=***;

Re: [PHP] Excluding apostrophe's

2006-12-22 Thread Paul Novitski
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'

Re: [PHP] Excluding apostrophe's

2006-12-22 Thread Casey Chu
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