Thanks for that. I can now submit the form but it adds 2 rows to the database
What im trying to do is this
I have a news article system on my site and when the admin wants to add an article he can either select a category from a drop down menu or create a new category
Hence
if ($existcat != ""){
$queryreg = mysql_query("INSERT INTO articles (`article_section`) VALUES ('$existcat')");echo mysql_error();
}else{
if ($existcat == ""){
$queryreg = mysql_query("INSERT INTO articles (`article_section`) VALUES ('$newcat')");echo mysql_error();
}
}The $existcat variable is a menu form field and has an empty value as default but also echos the column of the database that holds the categories
So what im trying to achieve is someting like;
If the $existcat has no value then they must have selected someting below the empty value so put it in the article_section column
If the $existcat does have no value then check the other form field called $newcat and store that value in the article_section column