Fixed "Create-system" form

This commit is contained in:
2022-01-19 12:55:42 +01:00
parent 0481dc380e
commit a6059d5831

View File

@@ -7,7 +7,7 @@ if(!isset($_SESSION["loggedin"]) || $_SESSION["loggedin"] !== true){
exit; exit;
} }
require_once "../assets/php/config.php"; require_once "../assets/php/config.php";
if(isset( $_POST ['sysID'], $_POST ['ServiceTag'], $_POST ['location'], $_POST ['WinKey'], $_POST ['EthMac'])){ if(isset( $_POST ['sysID'],$_POST['sysType'], $_POST ['ServiceTag'], $_POST ['location'], $_POST ['WinKey'], $_POST ['EthMac'])){
// Escape user inputs for security // Escape user inputs for security
$sysID = mysqli_real_escape_string($link, $_POST['sysTypeID'].$_POST['sysID']); $sysID = mysqli_real_escape_string($link, $_POST['sysTypeID'].$_POST['sysID']);
$sysType = mysqli_real_escape_string($link, $_POST['sysType']); $sysType = mysqli_real_escape_string($link, $_POST['sysType']);
@@ -181,7 +181,6 @@ mysqli_close($link);
<div class="form-wrapper md-elevation-8 p-4"> <div class="form-wrapper md-elevation-8 p-4">
<form action="<?php echo htmlspecialchars($_SERVER["PHP_SELF"]); ?>" method="post"> <form action="<?php echo htmlspecialchars($_SERVER["PHP_SELF"]); ?>" method="post">
<!-- Prepended text--> <!-- Prepended text-->
<div class='control-group'> <div class='control-group'>
<label class="col-md-8 control-label" >System ID <span style="color:red">*</span></label> <label class="col-md-8 control-label" >System ID <span style="color:red">*</span></label>
<div class='controls'> <div class='controls'>
@@ -211,9 +210,6 @@ mysqli_close($link);
</div> </div>
</div> </div>
</div> </div>
<!-- /PREPEND EXAMPLE -->
<!-- Text input--> <!-- Text input-->
<div class="form-group"> <div class="form-group">
<label class="col-md-4 control-label" for="sysType">System type <span style="color:red">*</span></label> <label class="col-md-4 control-label" for="sysType">System type <span style="color:red">*</span></label>
@@ -221,7 +217,6 @@ mysqli_close($link);
<input id="ServiceTag" name="ServiceTag" type="text" placeholder="" class="form-control input-md" required=""> <input id="ServiceTag" name="ServiceTag" type="text" placeholder="" class="form-control input-md" required="">
</div> </div>
</div> </div>
<!-- Select Basic --> <!-- Select Basic -->
<div class="form-group"> <div class="form-group">
<label class="col-md-4 control-label" for="location">Location <span style="color:red">*</span></label> <label class="col-md-4 control-label" for="location">Location <span style="color:red">*</span></label>
@@ -233,7 +228,6 @@ mysqli_close($link);
</select> </select>
</div> </div>
</div> </div>
<!-- Text input--> <!-- Text input-->
<div class="form-group"> <div class="form-group">
<label class="col-md-4 control-label" for="EthMac">Mac addres <span style="color:red">*</span></label> <label class="col-md-4 control-label" for="EthMac">Mac addres <span style="color:red">*</span></label>
@@ -241,13 +235,6 @@ mysqli_close($link);
<input id="EthMac" name="EthMac" type="text" placeholder="" class="form-control input-md" required=""> <input id="EthMac" name="EthMac" type="text" placeholder="" class="form-control input-md" required="">
</div> </div>
</div> </div>
<div class="form-group col-md-4">
<input type="submit" class="btn btn-secondary" value="Add">
</div>
</form>
</div>
<!-- Text input--> <!-- Text input-->
<div class="form-group"> <div class="form-group">
<label class="col-md-4 control-label" for="WinKey">Windows key <span style="color:red">*</span></label> <label class="col-md-4 control-label" for="WinKey">Windows key <span style="color:red">*</span></label>
@@ -255,7 +242,6 @@ mysqli_close($link);
<input id="WinKey" name="WinKey" type="WinKey" placeholder="" class="form-control input-md" required=""> <input id="WinKey" name="WinKey" type="WinKey" placeholder="" class="form-control input-md" required="">
</div> </div>
</div> </div>
<!-- Text input--> <!-- Text input-->
<div class="form-group"> <div class="form-group">
<label class="col-md-4 control-label" for="ServiceTag">Service Tag/Serial nr<span style="color:red">*</span></label> <label class="col-md-4 control-label" for="ServiceTag">Service Tag/Serial nr<span style="color:red">*</span></label>
@@ -263,7 +249,11 @@ mysqli_close($link);
<input id="ServiceTag" name="ServiceTag" type="text" placeholder="" class="form-control input-md" required=""> <input id="ServiceTag" name="ServiceTag" type="text" placeholder="" class="form-control input-md" required="">
</div> </div>
</div> </div>
<div class="form-group col-md-4">
<input type="submit" class="btn btn-secondary" value="Add">
</div>
</div>
</form>
<!-- / CONTENT --> <!-- / CONTENT -->