Topic: Recent topic list and startpage login

Hello

I'm not very good at PHP but i'm learning....
To my questions:

1. How do i make a list over recenttopics that looks like this?

<topicname>
   by <nick> <date> <time>
Just another weird topic
   by SuperMario Today 14:05:46

The topic name could be a litte bigger than the otherline

Can i do this with extern.php?

2:nd question.
Jag have a simple loginscript om my start page. This is the code for that loginscrpit:

<form id="login" method="post" action="forum/login.php?action=in">
<input type="hidden" name="form_sent" value="1" />
<label class="conl"><strong>Användarnamn</strong><input type="text" name="req_username" size="25" maxlength="25" tabindex="1" /></label>
<label class="conl"><strong>Lösenord</strong><input type="password" name="req_password" size="16" maxlength="16" tabindex="2" /></label>
<input type="submit" name="login" value="Logga in" tabindex="3" />
<br>
<a href="forum/register.php" tabindex="4">Inte registrerad än?</a>  
<a href="forum/login.php?action=forget" tabindex="5">Glömt ditt lösenord?</a><p>
</form>

This script redirects the user to the forum after login, i want the user to stay on the startpage afterlogin. But the login form should be replaced with "Logged in as <nick>"  and "Logout". I know this could be arranged with a simple if, but i don't know how i can check if there are any active sessions and what thhe username is

Thanks, i'm greatfull for any help!