Added DHCP option to IP Address field

This commit is contained in:
johnnyq
2023-09-26 16:40:24 -04:00
parent 498f9c7209
commit e1ef89a9a4
4 changed files with 27 additions and 6 deletions

View File

@@ -17,6 +17,9 @@ if (isset($_POST['add_asset'])) {
$serial = sanitizeInput($_POST['serial']);
$os = sanitizeInput($_POST['os']);
$ip = sanitizeInput($_POST['ip']);
if($_POST['dhcp'] == 1){
$ip = 'DHCP';
}
$mac = sanitizeInput($_POST['mac']);
$uri = sanitizeInput($_POST['uri']);
$status = sanitizeInput($_POST['status']);
@@ -89,6 +92,9 @@ if (isset($_POST['edit_asset'])) {
$serial = sanitizeInput($_POST['serial']);
$os = sanitizeInput($_POST['os']);
$ip = sanitizeInput($_POST['ip']);
if($_POST['dhcp'] == 1){
$ip = 'DHCP';
}
$mac = sanitizeInput($_POST['mac']);
$uri = sanitizeInput($_POST['uri']);
$status = sanitizeInput($_POST['status']);