Skip to content

Instantly share code, notes, and snippets.

@Chriswilldo
Created January 30, 2017 03:19
Show Gist options
  • Save Chriswilldo/80f3ff06a0da0ace13357ba9da020af0 to your computer and use it in GitHub Desktop.
Save Chriswilldo/80f3ff06a0da0ace13357ba9da020af0 to your computer and use it in GitHub Desktop.
<?php
include('../../config/connection.php');
$id = $_GET['id'];
$q = "SELECT avatar FROM users WHERE id = $id";
$r = mysqli_query($dbc, $q);
$data = mysqli_fetch_assoc($r);
?>
<img src="../uploads/<?php echo $data['avatar']; ?>">
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment