Bringing Login dialog in front of home page

Issues related to hyperlinks and web site navigation.
Forum rules
PLEASE READ THE FORUM RULES BEFORE YOU POST:
viewtopic.php?f=12&t=1901

MUST READ:
http://www.wysiwygwebbuilder.com/links.html
User avatar
alex4orly
 
 
Posts: 486
Joined: Mon Jan 20, 2014 8:17 am
Location: Australia
Contact:

Re: Bringing Login dialog in front of home page

Post by alex4orly » Wed Dec 13, 2017 10:43 pm

If so, how do I force people to login
I want only registered village residents to be able to visit the website

User avatar
BaconFries
 
 
Posts: 3897
Joined: Thu Aug 16, 2007 7:32 pm

Re: Bringing Login dialog in front of home page

Post by BaconFries » Wed Dec 13, 2017 11:58 pm

You could try the following simply place the login on the index page (which is usually known as the home page) with this you wouldn't need to have any navigation on this as it isn't needed (if you think of the logic you will see why) so when the members/villagers go to or use the following url example: http://www.yoursitename.au.org/index.php they are prompted to login. Once they have logged in they will be directed to frontpage.html which is now in theory the home page (again think of the logic behind this) which will have the navigation to browse the site. So having the login on its own without any form of navigation means outside users including the villagers can't or won't be able try to navigate to pages as they have no way to do so unless they login first (unless the know the url this is were the protected page comes into play). You would also need to provide a way for the villagers to sign up first if not already by providing a link this would be done by lets say adding a line of text saying "Before you can login you must register click here" the here being the link to the registration. All this is just something to consider not saying you use.

User avatar
alex4orly
 
 
Posts: 486
Joined: Mon Jan 20, 2014 8:17 am
Location: Australia
Contact:

Re: Bringing Login dialog in front of home page

Post by alex4orly » Thu Dec 14, 2017 12:07 am

Yes Baconfries - you are right. I intended placing the login object onto the Index.php page which is otherwise outside the equation.
My other problem is with some more advanced visitors, who will notice the name "frontpage.html" as part of the URL and will therefore be able to circumvent the login...
That is why I wanted to HIDE this through .htaccess - and until this moment being unable to do so.

To prevent someone from doing that - I thought I will check at the top of homepage.php (yes, changed the file type) the following, but it seems not to work... It doesn't detect the session AFTER login is OK

<?php
if (session_id() == "")
{
$login = "loginmember.php";
header('Location: '.$login);

exit;
}
?>

Isn't it too late for UK? Go to slip...

User avatar
BaconFries
 
 
Posts: 3897
Joined: Thu Aug 16, 2007 7:32 pm

Re: Bringing Login dialog in front of home page

Post by BaconFries » Thu Dec 14, 2017 12:13 am

It is, but I a preparing to go on vacation so packing, clearing things that I need to do before leaving and it at this time I get peace and quietness to do so but thanks....and what is that old saying "I'll sleep when I am dead" lol.

User avatar
alex4orly
 
 
Posts: 486
Joined: Mon Jan 20, 2014 8:17 am
Location: Australia
Contact:

Re: Bringing Login dialog in front of home page

Post by alex4orly » Thu Dec 14, 2017 12:18 am

Have a good time, are you travelling somweher?

User avatar
BaconFries
 
 
Posts: 3897
Joined: Thu Aug 16, 2007 7:32 pm

Re: Bringing Login dialog in front of home page

Post by BaconFries » Thu Dec 14, 2017 12:22 am

Traveling to the USA for Christmas and New Year... so no Laptop although I will have access to one or a PC I just won't have access to the programme...

User avatar
alex4orly
 
 
Posts: 486
Joined: Mon Jan 20, 2014 8:17 am
Location: Australia
Contact:

Re: Bringing Login dialog in front of home page

Post by alex4orly » Thu Dec 14, 2017 12:28 am

You go ahead and have a fantastic time (Hope you don't freeze in Times square), NY is beautiful this time of the year
Before you go, do you have any suggestion for my earlier question - to check if a session is ON in my frontpage home page?

All the best for 2018 and thanks for your help

Alex

Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests