- Code:
-
<% if !logged_in? %>
<form accept-charset='utf-8' method='post' action='login'>
Email: <input type='text' size='20' name='username'/>
Password: <input type='password' size='20' name='password'/>
<input type='submit' value='Log in'/>
</form>
<% else %>
Hello <%= contact.name %>. (<a href='logout'>log out</a>)
<% end %>
Basically, Im using a system called "Hostpay" for reselling web hosting.
The above code works fine in the index.rhtml file, but when I try it in header.rhtml it wont work.
It comes up with an internal server error, but then when I go back to the homepage, it says I am logged in.
Why is this? And how can I fix it?
Thanks.