Hi guys i have a small problem , Im wishing to print out a message halfway through the html page, The connection class and user class is working fine i mean its returning the messages to the index.php page but its just outputting them at the top of the page.
The index.php page. I have stripped the body,head tags for miminal post 🙂
<?php
include_once('includes/connectionclass.php');
$connect = new Connections();
$connect -> EstablishConnection();
include_once("includes/userclass.php");
if (isset($_POST['login'])){
$NewUser = new User();
$loginerror = $NewUser->authorise();
}
?>
<form id="form1" name="form1" method="post" action="">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td colspan="2"> </td>
<td width="73%"> </td>
</tr>
<tr>
<td colspan="2" class="centredfonts">Username</td>
<td><input name="username" type="text" class="inputs" id="username" /></td>
</tr>
<tr>
<td colspan="2" class="centredfonts">Password</td>
<td><label>
<input type="password" name="password" id="password" class="inputs" />
</label></td>
</tr>
<tr>
<td colspan="2"> </td>
<td><label>
<input type="submit" name="login" id="login" value="Login" />
</label></td>
</tr>
<tr>
<td colspan="2"> </td>
<td> </td>
</tr>
<tr>
<td width="9%"> </td>
<td colspan="2" class="loginerror"><?php echo $loginerror;?></td>
</tr>
</table>
</form>
As you can see im trying to print out the returned value from $NewUser->authorise function here
<td colspan="2" class="loginerror"><?php echo $loginerror;?></td>
as opposed to just putting it at the top of the page.
thanks to anyone who can help 🙂
regards Shab