Hi,
As Couch CMS don't offer the possibility for visitors to create their own accounts and then to login and access some restricted areas, (in Couch only the admin can create user accounts), I want to implement a login script for this purpose, but faceing the following situation.
I have the script and it wolud be easy to implement it on a single Login page (login.php). But what I'm trying to do is to place the login facility on each page header, when the user clicks on Login a dropdown will be displayed, here the user enter his login credentials and get access to a Dashboard. So I have the dropdown with the login form, I have the login script also, but having the following php code in heather for displaying login error messeges:
I don't know how to place all this header section into a snippet for embed it in every page of the website.
If I put it as it is, it messes all may design, it totally brokes the page.
Is there a way of dealing this situation?
Thank you,
Attila
As Couch CMS don't offer the possibility for visitors to create their own accounts and then to login and access some restricted areas, (in Couch only the admin can create user accounts), I want to implement a login script for this purpose, but faceing the following situation.
I have the script and it wolud be easy to implement it on a single Login page (login.php). But what I'm trying to do is to place the login facility on each page header, when the user clicks on Login a dropdown will be displayed, here the user enter his login credentials and get access to a Dashboard. So I have the dropdown with the login form, I have the login script also, but having the following php code in heather for displaying login error messeges:
<?php
/******************** ERRORMESSAGES
*****This code is to show error messages **************/
if(!empty($err)) {
echo "<div class=\"msg\">";
foreach ($err as $e) {
echo "$e <br>";
}
echo "</div>";
}
/******************************* END *************/
?>
I don't know how to place all this header section into a snippet for embed it in every page of the website.
If I put it as it is, it messes all may design, it totally brokes the page.
Is there a way of dealing this situation?
Thank you,
Attila