= 2) { // check for submit if ($_SERVER['REQUEST_METHOD']=="POST" ) { $assetclass_name = $_POST['assetclass_name']; $assetclassgroup_id = $_POST['assetclassgroup_id']; mysql_query("INSERT INTO assetclass (assetclass_name, assetclassgroup_id) VALUE ('$assetclass_name', '$assetclassgroup_id')") or die(mysql_error()); $assetclass_id = mysql_insert_id(); header_location("assetclassview.php?assetclass_id=" . $assetclass_id); } ?>