Still no luck. I'm all out of ideas so this is the best code I can come up with. This is my form fields.
<?php
$name=$POST['name'];
$email=$POST['email'];
$name=trim($name);
$email=trim($email);
$name=addslashes($name);
$email=addslashes($email);
$chartnews=$POST['chartnews'];
$generalnews=$POST['generalnews'];
require_once("./Includes/setup.inc.php");
if (($name!=" ")&&($email!=" ")&&($chartnews=="on"))
{
mysql_query("INSERT_INTO_subscribe_gen_VALUES_name='$name',email='$email' ");
}?>
The code for the connection is as follows:
<?php
$link = mysql_connect("localhost", "scottis2_smc", "sm1bgt129mn");
mysql_select_db("scottis2_test", $link);
echo mysql_errno($link) . ": " . mysql_error($link). "\n";
mysql_select_db("kossu", $link);
mysql_query("SELECT * FROM subscribe_gen", $link);
echo mysql_errno($link) . ": " . mysql_error($link) . "\n";
?>
I've used mysql_error as weed has suggested and now when I try to insert the data to the db 0: 0: appears at the top of the page but I'm not sure what this means?