simjay
03-11-2008, 08:58 PM
Hey Guys
I have moved my site to a new hosting company and the sites forms do not insert to the database. I have made a sql user with every permision but no luck. It inserts a unique ID with the auto increment but thats it??
<?php
$con = mysql_connect("localhost","scor_test","test");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}mysql_select_db("scor_main", $con);$sql="INSERT INTO contact (contact_name,contact_email,contact_comments)
VALUES
('$_POST[contact_name]','$_POST[contact_email]','$_POST[contact_comments]')";if (!mysql_query($sql,$con))
{
die('Error: ' . mysql_error());
}
echo "1 record added";mysql_close($con)
?>
I have moved my site to a new hosting company and the sites forms do not insert to the database. I have made a sql user with every permision but no luck. It inserts a unique ID with the auto increment but thats it??
<?php
$con = mysql_connect("localhost","scor_test","test");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}mysql_select_db("scor_main", $con);$sql="INSERT INTO contact (contact_name,contact_email,contact_comments)
VALUES
('$_POST[contact_name]','$_POST[contact_email]','$_POST[contact_comments]')";if (!mysql_query($sql,$con))
{
die('Error: ' . mysql_error());
}
echo "1 record added";mysql_close($con)
?>