<!DOCTYPE HTML>
<html>
<head>
</head>
<body>
<?php
$footer = "<a href='welcome.php'>return to main screen</a><br /></body></html>";
session_start();
if(!isset($_SESSION['uid']))
{
    ?>
    You wont be able to play!<br />
    <a href='welcome.php'>return to main screen</a><br />
    <?php
    echo $footer;
    exit;
}
$uid = $_SESSION['uid'];
require('conf.php');
/*make sure no character share the same name*/
$array = mysql_query("SELECT * FROM characters WHERE uid = '" . $uid . "'");
while($character = mysql_fetch_array($array))
{
    echo $character['name'] . " <a href='character.php?id=" . $character['id'] . "'>setup</a><br />";
}
mysql_close($sql);
?>
<form name="create_character" action="character.php" method="get">
<input type="text" name="name" />
<input type="submit" value="create new" />
</form>
<a href='welcome.php'>return to main screen</a><br />
</body>
</html>
