- Joined
- Feb 28, 2007
- Messages
- 446
- Reaction score
- 4
I'm working on a Custom Mini-CMS for MapleStory. What I'm trying to do is display the users character's name once they login, so far all I have displaying is the information from one table, but since this requires two tables how would I do that? I'm not sure This is all I have so far.
PHP:
<?
session_start();
$myuser = $_SESSION['name'];
if(!session_is_registered(name)){
header("location:index.php");
}
?>
<html>
<body>
Coming Soon<br>(<?php echo $myuser;?> You have Logged in Successfully)
<a href="./logout.php">Logout</a><br>
</body>
</html>
<?php
include("./includes/config.php");
$result = mysql_query("SELECT * FROM odinms.accounts,odinms.characters WHERE name='$myuser'");
echo "<center>My, AmoraMS DB information";
echo "<table border='0'>
<tr>
<th>Username</th>
<th>Last Login</th>
</tr>";
while($row = mysql_fetch_array($result))
{
echo "<tr>";
echo "<td>" . $row['name'] . "</td>";
echo "<td>" . $row['lastlogin'] . "</td>";
echo "</tr>";
}
echo "</table>";
echo "</center>";
?>