![]() |
|
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. |
| |||||||
| 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. |
![]() |
| | LinkBack | Thread Tools | Display Modes |
| | #1 | ||
| 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- | |||
|
| Featured Websites | ||||
|
![]() |
| Tags: logging, pages, specific |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
| |
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 | ||||
|