Yeah thanks that was it. Damn you guys are good and quick too lol. I will keep reading the books and may actually know what I am doing one day soon lol!
making black netry to table and the browser outputs the following:
Warning: mysql_real_escape_string(): Access denied for user: 'root@localhost' (Using password: NO) in /usr/home/garethna/public_html/addmysql.php on line 29
Warning: mysql_real_escape_string(): A link to the server could not be established in /usr/home/garethna/public_html/addmysql.php on line 29
Warning: mysql_real_escape_string(): Access denied for user: 'root@localhost' (Using password: NO) in /usr/home/garethna/public_html/addmysql.php on line 30
Warning: mysql_real_escape_string(): A link to the server could not be established in /usr/home/garethna/public_html/addmysql.php on line 30
Warning: mysql_real_escape_string(): Access denied for user: 'root@localhost' (Using password: NO) in /usr/home/garethna/public_html/addmysql.php on line 31
Warning: mysql_real_escape_string(): A link to the server could not be established in /usr/home/garethna/public_html/addmysql.php on line 31
Thanks weirdan! Took most that script from the book I have been learning from. I now did what you suggested and its adding the information I want rather than a blank entry. I presumed (wrongly!) the code was going to connect further down!
garethnash wrote:I presumed (wrongly!) the code was going to connect further down!
You was right indeed, the code was going to connect, but [php_man]mysql_real_escape_string[/php_man] needs an established connection to work since it uses mysql server settings (language dependent) to properly escape strings.