I am fairly new to php, but I have successfully managed to do this on a few occasions when working on other things. All I did for the bit of code I am working on now, is select the appropriate lines from other scripts and modify it so that the sql query is correct. Here is my script:
<?
$title = $frmtitle;
$category = $frmcategory;
$author = $frmauthor;
$source = $frmsource;
if($title && $category && $author && $source)
{
include 'contentconfig.php';
mysql_query("INSERT INTO users ( id , title , category , author , source ) VALUES ( '', '$title', '$category', '$author', '$source')") or die(mysql_error());
}
?>
This gives me this 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 ''author' , 'source' ) VALUES ( '', 'Testing', 'photoshop', 'Tes"
It would be great if someone could help me with this.