<?php
$username = 'program';
$password = 'e387985';
$database = 'program_resourcess';
$table = 'coldmp1';
$name = $_POST["name"];
$email = $_POST["email"];
$website = $_POST["website"];
$webname = $_POST["webname"];
$comments = $_POST["comments"];
mysql_connect('localhost',$username,$password)or die(mysql_error());
mysql_select_db ("program_resourcess");
$insert = "INSERT INTO $table (name,email,website,webname,comments,tablex)
VALUES ('".$name."','".$email."','".$website."','".$webname."','".$comments.",'".$table."')";
mysql_query($insert) or die ("An error has occured <br>Error: " . mysql_error());
mysql_close();
?>
returns:
An error has occured
Error: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'coldmp1')' at line 2
Can anyone help please?
I appriciate your time
~Gabor