Skip to content

Instantly share code, notes, and snippets.

@jakewtaylor
Last active October 25, 2017 15:18
Show Gist options
  • Save jakewtaylor/b739a638de8080997ec11629dff38758 to your computer and use it in GitHub Desktop.
Save jakewtaylor/b739a638de8080997ec11629dff38758 to your computer and use it in GitHub Desktop.
<?php
$sql = "SELECT id, forename, surname
FROM character_information
WHERE project_name='$project_name'
AND username='$usernamevariable'";
$characters = $conn->query($sql);
while ($character = $characters->fetch_assoc()) {
$id = $character['id'];
$name = $character['forename'] . ' ' . $character['surname'];
echo "<option value=\"$id\">$name</option>";
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment