$desc = $_REQUEST["subdesc"];
$myip = new ip();
- if($myip->addSubnet($name, $subip, $mask, $desc, $superid)) {
+ $err = $myip->addSubnet($name, $subip, $mask, $desc, $superid);
+ if($err ===true) {
header("Location: index.php?notice=range added");
} else {
- header("Location: index.php?error=invalid ipaddress");
+ header("Location: index.php?error=$err");
}
}