SHOW:
|
|
- or go back to the newest paste.
| 1 | - | if(isset($_GET['search'])){
|
| 1 | + | <?php |
| 2 | - | $user = $_GET['search']; |
| 2 | + | if(isset($_GET['search'])) |
| 3 | - | $fetch = mysqli_query($conn,"SELECT * FROM users"); |
| 3 | + | {
|
| 4 | - | ?><div style="float: right; display: inline; padding: 8px 0;"><?php |
| 4 | + | $user = $_GET['search']; |
| 5 | - | while($row = mysqli_fetch_array($fetch)){
|
| 5 | + | $fetch = mysqli_query($conn,"SELECT * FROM users WHERE `UserName` LIKE '%{$user}%'");
|
| 6 | - | $user = $row['UserName']; |
| 6 | + | ?> |
| 7 | - | $id = $row['id']; |
| 7 | + | <div style="float: right; display: inline; padding: 8px 0;"> |
| 8 | - | if(mysqli_num_rows(mysqli_query($conn, "SELECT * FROM `users` WHERE `UserName` LIKE '%$user%' AND id='$id'")) == 1){
|
| 8 | + | <?php |
| 9 | - | ?> |
| 9 | + | while($row = mysqli_fetch_array($fetch)) |
| 10 | - | <div id="profiles"> |
| 10 | + | {
|
| 11 | - | <a href="profile.php?id=<?=$id?>"> |
| 11 | + | $id = $row['id']; |
| 12 | - | <img src="uploads/<?=$id.$user?>" style="margin-top: 2px; height: 35px; width: 40px;"></img> |
| 12 | + | $uname = $row['userName']; |
| 13 | - | <?=$user?> |
| 13 | + | ?> |
| 14 | - | </a> |
| 14 | + | <div id="profiles"> |
| 15 | - | </div><br/> |
| 15 | + | <a href="profile.php?id=<?=$id?>"> |
| 16 | - | <?php |
| 16 | + | <img src="uploads/<?=$id.$uname?>" style="margin-top: 2px; height: 35px; width: 40px;"></img> |
| 17 | - | } |
| 17 | + | <?=$uname?> |
| 18 | - | } |
| 18 | + | </a> |
| 19 | - | ?> |
| 19 | + | </div><br/> |
| 20 | - | </div><?php |
| 20 | + | <?php |
| 21 | - | } |
| 21 | + | } |
| 22 | ?> | |
| 23 | </div> | |
| 24 | <?php | |
| 25 | } | |
| 26 | ?> |