<div class="table-responsive border rounded p-1">
<table class="table" align="center" style="width:auto; height:20px;">
<tr>
<th>ID</th>
<th >Usuario</th>
<th >Password</th>
<th>Créditos</th>
<th >Activo</th>
<th >Ban</th>
<th >Acción</th>
</tr>
<tr>
<?php
include("function.php");
$id = $_GET['id'];
select_id('usuarios','id',$id);
?>
<form action="" method="post">
<td><input type="text" value="<?php echo $row->id;?>" name="id" ></td>
<td><input type="text" value="<?php echo $row->usuario;?>" name="usuario"></td>
<td><input type="text" value="<?php echo $row->password;?>" name="password"></td>
<td><input type="text" value="<?php echo $row->creditos;?>" name="creditos"></td>
<td><input type="text" value="<?php echo $row->activo;?>" name="activo"></td>
<td><input type="text" value="<?php echo $row->baneado;?>" name="baneado"></td>
<td><input type="submit" class="btn btn-success" name="enviar"></td>
</form>
</tr>
</table>
</div>
</div>
<?php
if(isset($_POST['enviar'])){
$field = array("id"=>$_POST['id'], "usuario"=>$_POST['usuario'], "password"=>$_POST['password'], "creditos"=>$_POST['creditos'], "activo"=>$_POST['activo'], "baneado"=>$_POST['baneado']);
$tbl = "usuarios";
edit($tbl,$field,'id',$id);
header("location:index.php");
}
?>