TeamPhotoshop
Reviews, updates and in depth guides to your favourite mobile games - AppGamer.com
Forum Home Latest Posts Search Help Subscribe

PHP Login/Password

Page: 1 Reply
Jun 30th 2001#7202 Report
Member since: Mar 19th 2001
Posts: 63
I have a login/Password script (php). how do I add it to a page, do I just paste it in the body section? Or is there any easy ones out there that someone could leave the linkfor me. Thanks

P.S I would like it to display the users name at the top of the page when there logged in.
Reply with Quote Reply
Jun 30th 2001#7207 Report
Member since: Mar 18th 2001
Posts: 1452
Is it the one from me?

You can use the pages by themselves, or you can add the PHP code into any HTML code (but the extension of the page must be php\php3),...or...you can add HTML into the PHP pages.

The PHP must be wrapped in <?php ?> IF you want help on that you can email me.

For the displaying the user name (if its the script from me), you can add this anywhere in your page:

This needs to be in the beginning of the page:
[code]
<?php
require($DOCUMENT_ROOT.'/your_folder/functions.php3');
?>
[/code]

This can go in a table, or wherever you want to display the name:
[code]
<?php

include($DOCUMENT_ROOT.'/your_folder/user.php3');

if (user_isloggedin()) {

echo(" You are logged in as $user_name");

} elseif (!user_isloggedin()) {

echo(" You are not logged in");

}

?>
[/code]
You can change the "You are logged in as" and "You are not logged in" to say what you want.

Replace your_folder with the folder your files are in.

Hope that helps some.
Reply with Quote Reply
Page: 1 Back to top
Please login or register above to post in this forum