<?php
session_start();
include "../../lib/mssql.connect.php";
$params = array($_POST['id']);
$sql = "SELECT * FROM adminIP WHERE id = ?";
//run the query
$result = sqlsrv_query($conn, $sql,$params);
while($row = sqlsrv_fetch_array($result, SQLSRV_FETCH_ASSOC))
{
$id[] = array('id' =>$row['id']);
$name[] = array('adminname' =>$row['adminName']);
$ip[] = array('adminip' =>$row['adminIP']);
}
?>
<form method = "post" action="">
<div class="col-lg-10">
<label class="col-lg-2 control-label">Name</label>
<div class="col-lg-10">
<input type="text" class="form-control" id="txtname" value="<? echo implode(",", $name[0]) ?>" disabled="">
</div> <br/>
<label class="col-lg-2 control-label">IP</label>
<div class="col-lg-10">
<input type="text" class="form-control" id="txtip" value="<? echo implode(",", $ip[0]) ?>" data-content="Please enter your IP Address" data-container="body" data-toggle="popover" data-placement="bottom">
</div>
<div class="col-lg-10">
<input type="text" class="form-control" id="txtid" value="<? echo implode(",", $id[0]) ?>"style="display: none">
</div>
</div>
</form>
<?php
?>