C.Birch
07-29-2002, 05:09 PM
Right i have no idea how to go about this but basicy i want to password some areas of my site useing my vb database info.
The site and board are on same host server but not the same domain.
i want to make it so if you try to get to a page that you needed to be signed in for its shows you a login page but if your loged in it takes you right to the real page, also if your logged out and you login on that page i want it so it takes you to that page and not back to the main index page.
I already have it working useing a php/mysql login i found but it does not use my vb database where has thats who i want it working save people having to sign up 2 times.
code im useing right now on a page that needs you to be logged in to view is this:
<?php
include "auth.php"; // always include this, always.
$USER=new user('',$user_name,$id_hash,'','','','');
if ($USER->islogged_in()) {
site_header('Welcome back!');
?>
//Main page html code goes here
<?
account_links(); // shows account links from functions.inc
site_footer();
} else {
site_header('Welcome');
login_form(); // displays login form if not logged in
site_footer();
}
?>
The site and board are on same host server but not the same domain.
i want to make it so if you try to get to a page that you needed to be signed in for its shows you a login page but if your loged in it takes you right to the real page, also if your logged out and you login on that page i want it so it takes you to that page and not back to the main index page.
I already have it working useing a php/mysql login i found but it does not use my vb database where has thats who i want it working save people having to sign up 2 times.
code im useing right now on a page that needs you to be logged in to view is this:
<?php
include "auth.php"; // always include this, always.
$USER=new user('',$user_name,$id_hash,'','','','');
if ($USER->islogged_in()) {
site_header('Welcome back!');
?>
//Main page html code goes here
<?
account_links(); // shows account links from functions.inc
site_footer();
} else {
site_header('Welcome');
login_form(); // displays login form if not logged in
site_footer();
}
?>