= 2) { // check for submit if ($_SERVER['REQUEST_METHOD']=="POST" ) { $vlan_id = $_POST['vlan_id']; $vlan_name = $_POST['vlan_name']; $vlan_number = $_POST['vlan_number']; $vlan_info = $_POST['vlan_info']; mysql_query("UPDATE vlan SET vlan_name='$vlan_name', vlan_number='$vlan_number', vlan_info='$vlan_info' WHERE vlan_id='$vlan_id'") or die(mysql_error()); header_location("vlanview.php?vlan_id=" . $vlan_id); } // get current information $result = mysql_query("SELECT vlan_name, vlan_number, vlan_info FROM vlan WHERE vlan_id='$vlan_id'"); while ($row = mysql_fetch_object($result)) { $vlan_name = $row->vlan_name; $vlan_number = $row->vlan_number; $vlan_info = $row->vlan_info; } ?>