laravel ajax curd 搜索登录判断功能的实现(ajax查询数据库以json返回)学会了吗

随心笔谈1年前 (2023)发布 admin
123 0


@csrf
<div style=”width: 600px;height: auto;margin: 20px auto 0;”>
<table>
<tr>
<td>
用户名:
</td>
<td>
<input type=”text” class=”form-control” name=”user” value=”{{$arr[‘user’]}}”>
</td>
</tr>
<tr>
<td>
昵称:
</td>
<td>
<input type=”text” class=”form-control” name=”name” value=”{{$arr[‘name’]}}”>
</td>
</tr>
<tr>
<td>
密码:
</td>
<td>
<input type=”password” class=”form-control” name=”password” value=”{{$arr[‘password’]}}”>
</td>
</tr>
<tr>
<td>
确认密码
</td>
<td>
<input type=”password” class=”form-control” name=”password2″ value=”{{$arr[‘password’]}}”>
</td>
</tr>
<tr>
<td>
身份指定
</td>
<td>
<select name=”i_id” class=”form-control”>
@if($arr[‘i_id’]==1)
<option value=”{{$arr[‘i_id’]}}” selected>总长</option>
<option value=”{{$arr[‘i_id’]}}”>副老大</option>
<option value=”{{$arr[‘i_id’]}}”>大队长</option>
<option value=”{{$arr[‘i_id’]}}”>小队长</option>
<option value=”{{$arr[‘i_id’]}}”>组长</option>
@elseif($arr[‘i_id’]==2)
<option value=”{{$arr[‘i_id’]}}”>总长</option>
<option value=”{{$arr[‘i_id’]}}” selected>副老大</option>
<option value=”{{$arr[‘i_id’]}}”>大队长</option>
<option value=”{{$arr[‘i_id’]}}”>小队长</option>
<option value=”{{$arr[‘i_id’]}}”>组长</option>
@elseif($arr[‘i_id’]==3)
<option value=”{{$arr[‘i_id’]}}”>总长</option>
<option value=”{{$arr[‘i_id’]}}”>副老大</option>
<option value=”{{$arr[‘i_id’]}}” selected>大队长</option>
<option value=”{{$arr[‘i_id’]}}”>小队长</option>
<option value=”{{$arr[‘i_id’]}}”>组长</option>
@elseif($arr[‘i_id’]==4)
<option value=”{{$arr[‘i_id’]}}”>总长</option>
<option value=”{{$arr[‘i_id’]}}”>副老大</option>
<option value=”{{$arr[‘i_id’]}}”>大队长</option>
<option value=”{{$arr[‘i_id’]}}” selected>小队长</option>
<option value=”{{$arr[‘i_id’]}}”>组长</option>
@elseif($arr[‘i_id’]==5)
<option value=”{{$arr[‘i_id’]}}”>总长</option>
<option value=”{{$arr[‘i_id’]}}”>副老大</option>
<option value=”{{$arr[‘i_id’]}}”>大队长</option>
<option value=”{{$arr[‘i_id’]}}”>小队长</option>
<option value=”{{$arr[‘i_id’]}}” selected>组长</option>
@else
未知组
@endif
</select>
</td>
</tr>
<tr>
<td>
状态
</td>
<td>
<select name=”status” class=”form-control”>
@if($arr[‘status’]==0)
<option value=”{{$arr[‘status’]}}” selected>启用</option>
<option value=”{{$arr[‘status’]}}”>未启用</option>
@elseif($arr[‘status’]==1)
<option value=”{{$arr[‘status’]}}”>启用</option>
<option value=”{{$arr[‘status’]}}” selected>未启用</option>
@endif
</select>
</td>
</tr>
<tr>
<td>
手机号
</td>
<td>
<input type=”text” class=”form-control” name=”tel” value=”{{$arr[‘tel’]}}”>
</td>

</tr>
<tr>
<td>
IP白名单1
</td>
<td>
<input type=”text” class=”form-control” name=”ip1″ value=”{{$arr[‘ip1’]}}”>
</td>
</tr>
<tr>
<td>
IP白名单2
</td>
<td>
<input type=”text” class=”form-control” name=”ip2″ value=”{{$arr[‘ip2’]}}”>
</td>
</tr>
<tr>
<td>
头像上传
</td>
<td>
<input type=”file” name=”img”>
</td>
</tr>
<tr>
<td></td>
<td>
<button type=”submit” class=”btn btn-primary”>修改</button>
<button class=”btn btn-primary”>
<a href=”https://www.jb51.net/article/show” rel=”external nofollow” rel=”external nofollow” style=”text-decoration: none;color: white”>取消修改</a>
</button>
</td>
</tr>
</table>
<input type=”hidden” value=”{{$arr[‘id’]}}” name=”id”>
</div>

© 版权声明

相关文章