Jump to content
TNG Community

Log In / Log Out in HTML


clweed

Recommended Posts

My home page is now an html page. The Log in / Log out feature that is written in php no longer works.

<?php
    if( $currentuser ) {
        echo "<li><a href=\"logout.php\" class=\"lightlink\">$text[mnulogout]</a></li>\n";
    }
    else {
        echo "<li><a href=\"login.php\" class=\"lightlink\">$text[mnulogon]</a></li>\n";
    }

How would I convert this to work in my new home page?

Thanks,

Lee

Link to comment
Share on other sites

See my previous post. You need to use index.php as the index page if you want any php functions on that page to be able to work.

Roger

Link to comment
Share on other sites

See my previous post. You need to use index.php as the index page if you want any php functions on that page to be able to work.

Roger

Thanks Roger

Link to comment
Share on other sites

Jerome Liebowitz

See my previous post. You need to use index.php as the index page if you want any php functions on that page to be able to work.

Roger

As I posted elsewhere:

My understanding is that all you have to do is rename the file index.php, leaving all the html code, etc. intact. Then the php code works. You do NOT have to enter it all into the default index.php file that came with the program.

Jerry

Link to comment
Share on other sites

That was the gist of my reply - the file suffix must be .php for the server to parse the file through the php "stuff" - as you note simply changing the file suffix achieves this - you don't have to use the supplied index.php file to start from.

Roger

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...