I have a header file containing the login forms, and i've got another page for creating photo albums, when I click create on the form, it directs to another page which says "Username and password required" which is a part of my login script. The header is included in all my pages but for some reason the forms are getting confused.
Any ideas?
This is part of the login script.
<?php
if(isset($_SESSION['user']))
{
echo "<font size='2' face='arial'><div align='right'><a href='logout.php'>Log out</a></div>";
}
else
{
echo "
<table align='right'>
<tr>
<td >
<font size='2' face='arial'>Username: </font>
</td>
<td>
<form><input type='text' name='username' size='16' maxlength='25' />
</td>
<td>
<font size='2' face='arial'>Password: </font>
</td>
<td>
<input type='password' name='password' size='16' maglegnth='25' />
</td>
<td>
<input type='submit' value='Login'/></form>
<font size='2' face='arial'><a href='register.php'>Register</a></font>
</td>
</tr>
</table>
</form>";
}
?>
This is part of the create an album form
echo "
<table cellpadding='7' width='100%'>
<tr>
<td>
<font face='arial' size='4'>
My Albums<p>
<font size='2'>
Display albums here<p>
<font face='arial' size='4'>
Create an album<br>
<form action='createalbum.php' action='POST'>
<input type='text' name='albumname' maxlength='20'>
<input type='submit' value='Create'>
</form>
<td>
<tr>
</table>
";