Computer Webmaster Gaming Console Graphics Forum

Welcome to the Computer Webmaster Gaming Console Graphics Forum forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact us.

MK PitStop Main Earn $25 Earn Money Posting Extras Members Blogs Image Hosting User Pages
Go Back   Computer Webmaster Gaming Console Graphics Forum > Webmaster Forum > Website Coding > PHP
Register FAQ/Rules Become A V.I.P. Member Search Today's Posts Mark Forums Read

PHP PHP for some can be one of the hardest website programming codes, so do you need help on your PHP script, if it is php4, php5 or lower this is the place for you for any PHP help.

Google
Reply
 
LinkBack Thread Tools Display Modes
Old 07-01-2007, 3:30 PM   #1
greg@gofothdesigns.com
 
greg@gofothdesigns.com's Avatar
 
Posts: n/a
My Photos: (0)

Banked:
MK Cash: $

I am Worth:
MK Cash: $
Donate

Recent Blog: None

Default logging into specific pages

I have a login system built that logs a user into one page. That is, any
user in the data base with a name and password will be logged into the same
page, lets call it restricted1.php. For my business I would like to be able
to allow each user to log into and be directed to a page of sensitive
information about their account. So, user pete with password yahoo will be
directed to petespage.php. I figured the easiest way to do this would be
with a destination field in the data base. So I would have username,
password, destinaiton. The code I am using is below:

I want to be able to create a user account for all of my clients. They can
log in and view all their account info. To do this I need them to be able to
login to a certain page. To do this I want to set up a mysql table with the
following fields: username, password, destination_page. When they log in,
their user name and password is verified, and they are directed to the url
that is specified in the destination page. Is there anyway to do this using
the User Authenticatioin extention with dreamweaver? I've gotten it to work
for a single page, but I need user specific pages. The code I'm using is
below:

<?php require_once('Connections/conn.php'); ?>
<?php
// *** Start the session
session_start();
// *** Validate request to log in to this site.
$FF_LoginAction = $HTTP_SERVER_VARS['PHP_SELF'];
if (isset($HTTP_SERVER_VARS['QUERY_STRING']) &&
$HTTP_SERVER_VARS['QUERY_STRING']!="") $FF_LoginAction .=
"?".$HTTP_SERVER_VARS['QUERY_STRING'];
if (isset($HTTP_POST_VARS['username'])) {
$FF_valUsername=$HTTP_POST_VARS['username'];
$FF_valPassword=$HTTP_POST_VARS['password'];
$FF_fldUserAuthorization="";
$FF_redirectLoginSuccess="somepage.php";
$FF_redirectLoginFailed="sorry.php";
$FF_rsUser_Source="SELECT username, password ";
if ($FF_fldUserAuthorization != "") $FF_rsUser_Source .= "," .
$FF_fldUserAuthorization;
$FF_rsUser_Source .= " FROM users WHERE username='" . $FF_valUsername . "'
AND password='" . $FF_valPassword . "'";
mysql_select_db($database_conn, $conn);
$FF_rsUser=mysql_query($FF_rsUser_Source, $conn) or die(mysql_error());
$row_FF_rsUser = mysql_fetch_assoc($FF_rsUser);
if(mysql_num_rows($FF_rsUser) > 0) {
// username and password match - this is a valid user
$MM_Username=$FF_valUsername;
session_register("MM_Username");
if ($FF_fldUserAuthorization != "") {
$MM_UserAuthorization=$row_FF_rsUser[$FF_fldUserAuthorization];
} else {
$MM_UserAuthorization="";
}
session_register("MM_UserAuthorization");
if (isset($accessdenied) && false) {
$FF_redirectLoginSuccess = $accessdenied;
}
mysql_free_result($FF_rsUser);
session_register("FF_login_failed");
$FF_login_failed = false;
header ("Location: $FF_redirectLoginSuccess");
exit;
}
mysql_free_result($FF_rsUser);
session_register("FF_login_failed");
$FF_login_failed = true;
header ("Location: $FF_redirectLoginFailed");
exit;
}
?>

How could I alter this code to grab a url in the database and only display
those pages.
This code is for one specific set page. Any body know what I
can do? Thanks for any help!

-g-


 
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit!
Reply With Quote
Featured Websites
Free Space
Free Space
Free Space Free Space
Reply
Tags: , ,




Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Issue Logging On Via Linksys Wireless Cable Router Oscar Console Subjects 5 06-26-2007 1:33 AM
Looking for specific GPS software Heinrich Pfeifer GPS 0 06-25-2007 9:53 PM
And Firebug logging to Log package Travis Swicegood Pear 5 05-20-2007 7:41 PM
[PEPr] Proposal for Logging::Log_XML Michael Vladimyr Gower Pear 0 05-20-2007 7:41 PM
[PEPr][ADMIN] Changes in proposal for Logging::Log_xml Helgi Žormar Pear 0 05-20-2007 7:41 PM


Featured Websites




All times are GMT +1. The time now is 11:18 AM.


Powered by: vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO 3.0.0
Cheap Computers
MK PitStop Copyright 2005 - 2008

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98