FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


create a page of access in PHP?





alskmaster
how I create a page of access in PHP?

Example:

To have access the content of a page it would be necessary to have a password, but the main page would open asking for this password.

Necessary to create a page.

But I do not know to use php.

And I do not know another good language that he makes this.


Somebody could help me?
dandelion
Please check the following links out.

HTTP authentication with PHP
PEAR::Auth
misterdimiz
You can add this code at the top of your page

Code:
<?

$url="http://www.yoursite.com";

if (($id!="your_id")or($pw!="your_pw")) {

header("Location: $url");

}

?>


or

Code:
<?

$url="http://www.yoursite.com";

if (($id!="your_id")or($pw!="your_pw")) {


}

?>

<script LANGUAGE="JavaScript">
location = "<?php echo $url; ?>";
</script>


your login page (index.php) must contain a form whit 2 textfield "id" and "pw"
to send with _GET method
Related topics
php admin and mysql admin console
php variables
E-Cards with PHP & MySQL
How to create a dynamic PHP website.
Inserting data to MYSQL with a PHP script
Php - Basic Encryption site
"Forms To Go" create scripts in PHP, ASP and Perl
Never Mind Problem Resolved
Can I refresh a page using php?
Creating a page with php
Make me a job application page in php and earn 110 FRIH$!
Managing page access...
pass varaibles to another page in PHP
Want to see a phpinfo page showing php settings?
server access, PHP vs AJAX
Reply to topic    Frihost Forum Index -> Scripting -> Php and MySQL

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.