= 2) { // check for submit if ($_SERVER['REQUEST_METHOD']=="POST" ) { $subnet_address= $_POST['subnet_address']; $subnet_mask = $_POST['subnet_mask']; mysql_query("INSERT INTO subnet (subnet_address, subnet_mask) VALUE ('$subnet_address', '$subnet_mask')") or die(mysql_error()); $subnet_id = mysql_insert_id(); header_location("subnetview.php?subnet_id=" . $subnet_id); } ?>