Adding PHP to a database table
Self-taught PHP, but also read some of the solutions, but still not. In the following cases, can not successfully add data to the database, I hope the big God pointing. This is my watch.
Untitled Document
$db = mysql_connect ("localhost", "root", "root");
mysql_select_db ("Test", $db);
if (Isset ($_post[' submit ') &&$_post[' submit '])
{
VALUES (' $_post[c_id] ', ' $_post[c_name ', ' $_post[sector ', ' $_post[e_address] ', ' $_post[mail_address ', ' $_post[ Classification] ' $_post[started_date] ', ' $_post[contact] ', ' $_post[con_address] ' now () ';
mysql_query ($sql);
echo "Success";
}
?>
echo "registered successfully";
?>
------Solution--------------------
1, the form control is not defined, are changed to the following:
2. The Submit button does not have a name value and will not enter the IF branch.
Name= "Submit">