Ok, thanks for the reply, although i didnt quite understand it as i am still a novice. Below is the entire code of each three pages. I forgot to mention 1 other page....members.php .......which the iframe returns on a succesgul login. Login php just processes the username and passwoed then returns members.php in the frame. I haven't shown members.php below because i dont think its relevant to the question.
So re-iterating, bassiacally, when the member logs in through the iframe on Main.php, if succeful, i need another part of main.php to update, without reloading the page to reflect the username.
cheers
Main.php
<?php
// this starts the session
session_start();
?>
<html>
<head>
<title>layout</title>
<style type = "text/css">
div#welcome {position:absolute; top:0px; left:559px; width:440px; height:20px; border:1px black solid; background-color:rgb(132,165,191);}
div#login {position:absolute; top:20px; left:559px; width:440px; height:60px; border:1px black solid; background-color:green;}
div#links1 {position:absolute; top:0px; left:10px; width:550px; height:20px; border:1px black solid; background-color:rgb(243,248,251);}
div#header {position:absolute; top:20px; left:10px; width:550px; height:60px; border:1px black solid;}
div#links2 {position:absolute; top:79px; left:10px; width:989px; height:20px; border:1px black solid; background-color:rgb(10,110,186);}}
div#nav {position:absolute; top:99px; left:10px; width:175px; height:440px; border:1px black solid;}
div#body {position:absolute; top:99px; left:184px; width:815px; height:440px; border:1px black solid; overflow:scroll;}
a.login:link {cursor

ointer; color:blue; text-decoration:none; font-size:10pt; font-style:bold;}
a.login:visited {cursor

ointer; color:blue; text-decoration:none; font-size:10pt; font-style:bold;}
a.login:hover{cursor

ointer; color:blue; text-decoration:none; font-size:10pt; font-style:bold;}
a.login:active {cursor

ointer; color:blue; text-decoration:none; font-size:10pt; font-style:bold;}
a.links1:link {cursor

ointer; color:rgb(69,122,196); text-decoration:none; font-size:10pt; font-style:bold;}
a.links1:visited {cursor

ointer; color:rgb(69,122,196); text-decoration:none; font-size:10pt; font-style:bold;}
a.links1:hover{cursor

ointer; color:rgb(69,122,196); text-decoration:none; font-size:10pt; font-style:normal;}
a.links1:active {cursor

ointer; color:rgb(69,122,196); text-decoration:none; font-size:10pt; font-style:bold;}
</style>
</head>
<body OnUnload = "alert('goodbye')";>
<div id = "welcome">
<?
if(isset($_SESSION['Username']))
echo "".$_SESSION[Username];
else
echo welcome;
?>
</div>
<div id = "login"><iframe members="members" src="members.html" frameborder="0" width="438" height="60"></iframe>
</div>
<div id = "links1"> <a href="openaccount.html" target="_blank" class="links1">Open an Account</a> <img src=dline.bmp align=middle>  <a href="about us.html" target="_blank" class="links1">About Us</a> <img src=dline.bmp align=middle>  <a href="help.html" target="_blank" class="links1">Help</a> <img src=dline.bmp align=middle>  <a href="responsible gambling.html" target="_blank" class="links1">Responsible Gambling</a>
</div>
<div id = "header"><img src=logo.bmp></div>
<div id = "links2">links2</div>
<div id = "nav">nav</div>
<div id = "body"><img src=kitten.jpg></div>
</body>
</html>
Members.html
<html>
<head>
<title>main</title>
<style type="text/css">
a.links1:link {cursor

ointer; color:rgb(69,122,196); text-decoration:none; font-size:10pt; font-style:bold;}
a.links1:visited {cursor

ointer; color:rgb(69,122,196); text-decoration:none; font-size:10pt; font-style:bold;}
a.links1:hover{cursor

ointer; color:rgb(69,122,196); text-decoration:none; font-size:10pt; font-style:normal;}
a.links1:active {cursor

ointer; color:rgb(69,122,196); text-decoration:none; font-size:10pt; font-style:bold;}
</style>
</head>
<body bgcolor=rgb(243,248,251) style="vertical-align:top; padding:0px; margin:0px;">
<form Name="login" method="post" action="login.php">
<table border="0" cellpadding="0" cellspacing="0" valign="top">
<tr>
<td style="font-family:callibri; font-size:12px; text-align:right; vertical-align:middle; padding-right:3px; padding-left:2px;">username</td>
<td style="padding-bottom:0px;"><input type="text" size=20 value="" name=Username style="height:17px; width:90px; margin-top:0px;"></td>
<tdstyle="padding-bottom:0px;"> </td>
</tr>
<tr>
<td style="font-family:callibri; font-size:12px; text-align:right; vertical-align:middle; padding-right:3px; padding-left:2px;">password</td>
<td style="padding-bottom:0px;"><input type="text" size=20 value="" name=Password1 style="height:17px; width:90px;"</td>
<td style="padding-bottom:0px;"><input type=submit value="Login" style="height:20px; width:45px; font-size:10px;" </td>
</tr>
</form>
<tr>
<td style="padding-left:2px;">    <a href="registration.html" class="links1">Register</a>  </td>
<td> <img src=dline.bmp align=middle>  <a href="forgot.html" class="links1">Forgot Password?</a></td>
</tr>
</table>
</body>
</html>
Login.php
<?PHP
$Username=$_POST['Username'];
$Password1=$_POST['Password1'];
$user_name="jeupcom_david";
$password="xxxxxxxxx";
$database="jeupcom_tip";
$server="localhost";
$db_handle = mysql_connect($server, $user_name, $password);
$db_found = mysql_select_db($database, $db_handle);
if ($db_found) {
$SQL = "SELECT * FROM users WHERE Username='$Username' AND Password1='$Password1'";
$result = mysql_query($SQL);
$num_rows = mysql_num_rows($result);
If ($num_rows<1){
echo "<script language=javascript>alert('The user information you have entered is incorrect.')</script>";
echo"<script>document.location.href='members.html' </script>";
}
else {
$SQL = "SELECT * FROM accountbalance WHERE Username = '$Username'";
$result = mysql_query($SQL);
$db_field = mysql_fetch_assoc($result);
$Balance = $db_field['Balance'];
session_start();
$_SESSION['Username']=$Username;
$_SESSION['Balance']=$Balance;
header("Location:members.php");
$query = "INSERT INTO usersloggedin (Username) VALUES ('$Username')";
mysql_query($query) or die(mysql_error());
mysql_close();
}
}
else {
echo "<script language=javascript>alert('There was a problem connecting with the database.')</script>";
mysql_close();
}
?>