Once logged in the way to direct the user to their unique page based on their DB info

OK, I got the user who creates a username, password and id. Once they were connecting I want to be able to send them to a page containing information of their information entered into the database. I was thinking session varialble load information contained in the database based on the id of the user, so that's what I did

Here is the code

Login page php check

<?

$userid = mysql_real_escape_string ($userid);

$password = mysql_real_escape_string ($password);

If ($rec = mysql_fetch_array (mysql_query ("" SELECT * FROM Hdatabase WHERE userid = '$userid' AND password = '$password' ""))) {}

If (($Rec['userid']==$UserID) & &($rec['password']==$password)) {}

include "include/newsession.php;

echo "< class p = 'data' > < center > connected successfully, < br > < br > < a href ="logout.php"> LOGOUT < /a > < br > < br > < a href = welcome.php > click here if your browser does not automatically redirect, or you don't want to wait." < /a > < br / > < / center > ';

Print "< script >"

Print "= self.location" welcome.php "; » ; Comment this line if you do not want to redirect

print '< /script > ';

}

}

else {}

session_unset();

echo "< police ="Verdana"size ="2"color = red > incorrect Login." Use your correct username and password and try < br > < Center > < input type = "button" value = "Retry" onClick = 'history.go(-1)' > < / center > ';

}

? >

It's the php newsessions

<? PHP

error_reporting(E_ERROR |) E_PARSE | E_CORE_ERROR);

$session ['id'] = session_id ();

$session ['userid'] = $userid;

$session ['name'] = $name; This is one that I added

echo $session ['userid'];

? >

This is where I even if I added new sessions then place them in the home page?

Add it as a new session, I added the welcome.php

<?

echo "$session [name];

? >

I hope you can help

Create a new page with a form and 2 text fields, then go to "Server behaviors" ==> "User authentication" ==> "User login" and follow the instructions to create a login page.

Tags: Dreamweaver

Similar Questions

  • Information of the logged-on user does not appear after the user updates their information

    I created 2 pages. Page 1 has a recordset that only displays the users username and password, I made a filter on the recordset as username = var = MM_Username session. When he clicks on update, which is just a link to page 2, they go to page 2 which has a Recordset which filters their modules in the same way and allows them to update their username and password. I used a behavior to update this page as well. Thus, when the user updates their information it modifies the database information and works very well.

    The problem: when the user returns to the page 1 to see their update of username and the password that they have just updated, it is EMPTY. No info displays on the screen, even when I refresh the page. There if MM_Username var isn't refreshing while connected. Because when the user disconnects and connects, it displays new user name and password on page 1.

    It DOES not work when I take the filter out of the 1 Recordset page, but that doesn't make me all good b/c the user must of course only to see their information.

    I'm under DW CS3, php and mysql.

    Help, please! Thank you.

    I know a little php and takes care of everything.

    Great, because this will save my gibberish long habit ;-)

    I m attaching a screenshot of the login page updated the PHP code, which has only three new lines to take custody of.

    Line 1: Add the primary key to the 'users' table to the query

    Line 2: Add function mysql_fetch_row whose resource is the existing variable in $LoginRS

    Line 3: Add the Session Variable MM_user_id and assign the $row variable [0] (see line 2).

    Well, that s, and on other pages, you can define a query such as...

    "SELECT username, password FROM users WHERE id" is equal to the Session Variable MM_user_id

  • Changing the components of the user interface on a page programmatically

    Do I need auto-bind backing bean if I have to programmatically change the attributes, the events of the user interface on a page components? I'm sure that Yes. Thus, each jsf page must have a bean of support to do the above and a bean managed to retrieve/store data? It seems that backing bean is more than enough. Why do I need a managed bean? Is there a way to delete unwanted ui components accessors in the bean to support? Thank you.

    You need a support to programaticaly access bean and change elements on your page.
    But you do not need to expose each component on your page in the bean support - the best practice is to expose a few components that actually access you.
    So instead of using the auto-bind tge option that offers JDeveloper, create your page without a bean of support. Then when you need to access a specific object in your code, go to the attribute binding of this object in the property inspector, click the > change to his right and JDeveloper will give you a quick way to expose this specific component in a pod of support.

  • DPS is their function where the user can choose which pages they want to keep, to build a custom (build yours) version for themselves.

    DPS is their function where the user can choose which pages they want to keep, to build a custom (build yours) version for themselves.

    N °

    Neil

  • Really? Once again? "The user has sufficient privileges to install Adobe Flash Player"

    My browser is firefox.

    "The user has sufficient privileges to install Adobe Flash Player" is the incessant problem, I had several times the Flash update.

    Come on guys, it's beyond ridiculous. Installation always stops in 55% exactly and is never completed, leaving me to give up Firefox for Chrome. I mucked on the last, half a dozen times this has happened during the update and just by pure chance she managed to install, but it has been 2 hours mucking similar and I'm now getting nowhere.

    This has been a persistent problem and affected many users of firefox for years, as I saw it by my own experience and google search. Is there a way you all can provide a SIMPLIFIED solution to this question, in coordination with firefox or by providing a 'unique' Firefox Installer? Really it's too annoying.

    In any case, before anyone asks, yes I am logged in as administrator, and Yes, I ran the Installer "as admin" by right-clicking. I also went ahead and completely uninstalled flash (and emptied such records as requested in other threads here) and reinstalled it, only to watch the progress bar to put an end to 55%, as usual and let me by clicking on this icon of Chrome stupid to have a programme of work for flash.

    Honestly people, why, after years, it continue to be a persistent problem? Fix it for the love of God! Are you a lot guys make the ObamaCare website or what? Firefox people are loyal to our browser, and the installation of new versions of flash on this browser is a bloody useless pain in the you know what.

    Sorry for the frustration visible, but if someone could please provide a solution, I wouldn't need to be to complain here universal work and moaning.

    Try a new installation as described in http://forums.adobe.com/thread/928315

    Regarding the installation programs use these installers in offline mode:

    Flash Player ActiveX (Internet Explorer)

    Flash Player plug-in (all other browsers)

    If you still experience problems during installation, please send the contents of the FlashInstall.log file

    C:\WINDOWS\system32\Macromed\Flash and

    C:\Windows\syswow64\Macromed\Flash

  • The administrative user cannot Log in, "the user profile Service has no logon. Pfoile user cannot be loaded.

    OP: Administrative user unable to Log in
    Dell Bostro 1000 using Vista.  When you try to open a session as long as the message from the administrator that is displayed is "the user profile Service has no logon.  Pfoile of the user cannot be loaded.  The administrator can connect to a different user account.  When she tries to reinstall Vista she gets the following message: must remove the power cell.

    Any suggestions?  Thaks

    Rick

    Hi Rick Ramza,

    I suggest you to follow the steps described in the article below and check if this solves the problem.

    Error message when you log a computer Windows Vista-based or Windows 7 by using a temporary profile: "the user profile Service has no logon. User profile cannot be loaded:
    http://support.Microsoft.com/kb/947215

    Kind regards
    Manasa P-Microsoft Support.

  • Get the error message "failure to log - on, the user profile user profile Service failed to load.

    Original title: I downloaded 17 Win. 7 pro updates Wednesday, June 15

    Since this update was completed, I was unable to get into my computer; It goes through the usual startup routine, then it goes straight to the 'return - sleep' emblem that I usually just click on (when the computer is back to sleep, not a start-up), and the answer I get is "failure to log - on, cannot load user profile user profile Service. I sure as hell don't want to lose all my data with a fresh 7 - Pro disc. Someone at - it ideas? I swear I'll hold all Microsoft Updates for a few months before installing again. I also had problems with updates of March 2015. Thank you; Croft * address email is removed from the privacy * P.S. I use my old X.P. to connect again.

    Hello

    Thanks for posting your question on the Forums of community of Microsoft.

    According to the description, you receive error message "the user profile service has no log on." User profile could not be found.

    I would be grateful, if you can provide us with the following information to help us better understand the question?

    • Did you the latest changes on your system prior to this problem?

    I suggest you follow the advice given by Jayant Narang replied the August 14,2014 from the link given below and check.

    Reference:

    http://answers.Microsoft.com/en-us/Windows/Forum/Windows_7-security/the-user-profile-service-failed-the-log-on-user/77768431-FAEC-4DA8-b2cb-ddd95fb2e97d

    Hope this information is useful. Please let us know if you need help with Windows.

  • An application to run once installed by the user

    1 - once the user finishes the download and installation of a new application, can it start without the user clicking on the application to start?

    2 - What if an older version is running and the user tries to download a newer version, is it possible re-breakfast version updated without the user clicking on the icon.

    3 - If an older version is running in the background, can the application update itself and works again without user interaction?

    Even if the BlackBerry smartphone is not reset when an application is installed (i.e. new installation using the browser) can run an auto-start application.  It'll be auto-start after installation.

    This link explains why a reset may be necessary:

    -The reason for which reset is required when you upgrade an application
    Article number: DB-00602

    http://www.BlackBerry.com/knowledgecenterpublic/livelink.exe/fetch/2000/348583/800332/800620/What_Is...

  • This log in the user has the appropriate rights to use WebCenter Capture

    Hi experts,

    We have WCI 11.1.1.8.0 Setup. It has configured WEC. However when I have the connection with the user "weblogic. It is user of domain administrator. WEC allows the user to open a session and displays the top navigation bar. However, in the body, it shows the message below

    "This user log has no appropriate rights of use WebCenter Capture"

    WEC.PNG


    I don't know I don't have a good group / role to this user. I don't know who is who.


    Kind regards

    Vikrant Korde.

    Hey Vikrant,

    This happens if the user is not to capture the Application role.

    Check this box:

    Connect to EM

    Right-click in the capture_domain, select security, then the Application roles

    In the field of Stripe Application, select capture and then click on the search request roles icon to view the Capture application roles.

    The user to capture add this weblogic.

    It works now.

  • Authentication of the user - connection to different pages / PHP script / DW8

    Hi, I want to develop a PHP script to a login page that will direct users to different URLS depending on the URL address associated with their individual files stored in a MySQL database.

    I've set up a MySQL database that includes the fields username (1) (2) address, password and the URL (3).  I use Dreamweaver 8 and am relying on server behavior 'user log '.

    After selection all 3 fields in the table x y at - it a specific code that can be inserted in the option "If the connection is successful, go to" resolve this query?

    The following link refers to what I'm looking for... .but it does not provide an answer for PHP/MySQL!

    http://kb2.Adobe.com/CPS/158/tn_15881.html

    Thank you, Simon

    My Code so far:

    @mysql_select_db ($database_connLogin, $connLogin);
    $query_login = "SELECT username, password FROM USERS";
    $login = mysql_query ($query_login, $connLogin) or die (mysql_error ());
    $row_login = mysql_fetch_assoc ($login);
    $totalRows_login = mysql_num_rows ($login);
    ? > <? PHP

    Validate request to connect to this site.
    If (! isset {})
    session_start();
    }

    $loginFormAction = $_SERVER ['PHP_SELF'];
    If (isset($_GET['accesscheck'])) {}
    $_SESSION ['PrevUrl'] = $_GET ['accesscheck"];
    }

    If (isset($_POST['userName'])) {}
    $loginUsername = $_POST ['userName'];
    $password = $_POST ["password"];
    $MM_fldUserAuthorization = "";
    $MM_redirectLoginSuccess = 'members.php ';
    $MM_redirectLoginFailed = "tryAgain.php";
    $MM_redirecttoReferrer = false;
    @mysql_select_db ($database_connLogin, $connLogin);

    $LoginRS__query = sprintf ("SELECT username, password AND password OF USERS WHERE userName = %s is %s",
    GetSQLValueString ($loginUsername, "text"), GetSQLValueString ($password, "text"));

    $LoginRS = mysql_query ($LoginRS__query, $connLogin) or die (mysql_error ());
    $loginFoundUser = mysql_num_rows ($LoginRS);
    If {($loginFoundUser)
    $loginStrGroup = "";

    I think you can ignore it. Once you edit the code of a server behavior, Dreamweaver can recognize it is no longer. That's why you get the error message.

  • column of a link with the ability to send the user on several different pages

    using apex 4.0

    In my example:
    User: Secretary for a large company in charge of the HR database, enter new employees, reorganizing the employees, managers, etc.).
    Employee: A person working for the company whose information is in the database.

    The problem: my client wants the data divided into several subcategories, so, for example, it would be like sales, managers, etc., using the human resources database. The main page of this project contains a table that lists all the company employees, low to high. There is a column of navigation with several links to predefined reports filter that filters data on the question whether the employee in the database is a seller, Manager, etc.. If the user clicks on the link change, it will take them to a page master detail where the upper part is general information and background tasks of the employee. The problem is that, according to his level, there may be additional details that the user will want to change, such as if the employee is responsible for, the user will also want to see another table a list of employees by the Manager. There is also a second level of managers who will have a table of managers of this person manages. The dream is that there is a list of links above the tabular presentation, which will allow the user to choose what table they want to see. I thought about the following:

    1. create several copies of the home page, one for each subcategory, so that she will be the link change correct.
    Positives - Simple, easy, I know how to.
    Negative - would like it to appear on the same page, such that if the user deletes / adds a column in a single page, this change would occur on all other pages. I also have to make the same changes on several pages, one is required.

    2. create a text field hidden on the page that records the last link, what they clicked. When the user clicks on the link change, some kind of javascript selects the right page to go to in view of what is in the box.
    Positives - seems simple enough, but I have not tapped into javascript a lot
    Negative - not for sure if it is even feasible, would need help

    3. create a subpage of master-detail, that holds all the necessary tables and hide those that are not. When the user clicks on a link, the link triggers the current table to hide and another to appear.
    good points - all in the same place, that one page to link to main page
    negatives - it would require at least 5 tables on one page and I do not know how the apex would like that. I also don't like the idea of the page calling itself when the user is looking at senior managers and to display a lower Manager / employee.

    4. a creative method / useful / incredibly simple bore by a user of this forum.

    Because I'm in a very short, customer review period next week, I implémenterai #1 because it is the easiest and most straight forward, but I would like to know your thoughts to make much cleaner.

    Published by: rabbitman June 4, 2012 08:07

    I don't know if it's the best way to accomplish what you want, but it worked for me.

    Change the link in the column to specify the following for a target URL, where EMP_NO and EMP_TYPE are columns of the report.

    JavaScript:apex. Submit('#EMP_NO##EMP_TYPE#')

    In the processing of the page after several branches to different pages depending on the type of employee. For example,.

    Branch to Page 2: Condition = instr (: REQUEST, 'SALES') > 0
    Branch to Page 3: Condition = instr (: REQUEST, "MANAGER") > 0
    Branch to Page 5: Condition = instr (: REQUEST, 'PRÉSIDENT') > 0

    Since the: APPLICATION also has the EMP_NO, you can use this to set the value of the EMP_NO for the target page, pull up to the employee's file.

    Natasha

  • I accidentally typed my password for the account of the user to an unencrypted page

    original title: password security

    I accidentally typed my password for the account of the user to a page that is unencrypted. The response was that the username password is incorrect, so I broke down and disconnected.  I'm worried that the password has been clearly displayed, but do not know with certainty

    Hello

    Probably won't matter if you change your password.

    Hope that helps.

  • [ADF, JDev12.1.3] How to change the image displayed in a page based on a parameter in the URL?

    Hallo,

    the index of my application page is called by the URL that ends with .../MyApplication/faces/index

    I want to add a parameter in the URL so that the picture in the page change based on this setting.

    The param doesn't have to be the name of the image file to display, but only a code.

    For example

    ? param = 1-> pathX/imageA.jpg

    ? param = 2-> pathY/imageB.jpg

    ? param = 3-> pathZ/imageC.jpg

    ...

    You could you kindly help me in this?

    Thank you

    Federico

    So if you have something like: .../MyApplication/faces/index?someParam=1

    You can use:

    Or you can link to custom as servlet: and then decode parameter and the return of this servlet image.

    Dario

  • Is it far from creating a portal secure for each representative commercial? For example, you have one login page which redirects the user to their own page private (such as a bank account opening)?

    How can I create a portal secure to each individual sales representative. For example (site of the Bank connection), there is a common page connect to which redirects you to your private account.

    Hello

    Please refer to this topic

    Re: Can I create a login/password in the Muse for a HTML5 page or two?

  • How to capture the input value of text by the user in a popup page search LOV?

    I need to capture the user entry in the LOV search page. I added a controller in the LOV region, and the speed is also work, but I have to hold the entry to search for in the contextual search page. Also do you know what the text entry id "keyword"? then I can try store the value in LICS of the Commander.

    Hello

    Why do you need to write code in LICS?

    You have the user type field in your query of Lov VO (then only you had created search are they allowed in Lov research/item of type user), I proposed is just changes to sql to check if the user type is vendor and caters fields null., something like below for each address field:

    , DECODE (user_type, "PROVIDER", NULL, ) address_field1

    You should always share full details, including related sql code and xml on your question to avoid all these discussions back

    Kind regards

    Sandeep M.

Maybe you are looking for

  • HP 6700 Premiumk

    I just want to print using black ink only.  I put my printer to print using black ink only.  However, it does not print because the printer says that my yellow and magenta cartridges are empty.  I have the XL cartridges and two printed in color.  I o

  • 12.3.1.23 iTunes won't download album despite the correct metadata artwork

    For some albums, iTunes 12.3.1.23 will not download album despite the correct metadata artwork. It will download other graphic works (sometimes even when metadata is not correctly match). Is it possible to determine the metadata that should be used t

  • error on Lenovo Y470 NVIDIA driver update

    Hey guys... Sorry, but I would like to ask you a favor to help me update my Nvida Geforce gt550M graphics card driver as latest games require the newer drivers to run without any problems... I tried so many ways guru3d driver sweeper program to remov

  • Keep the LabVIEW window on top BUT...

    Fellow LabVIEW users, I have the following rather simple problem, but once again hard. The problem is as follows. My main LabVIEW application calls an another VI whose façade is charged when the VI is called. The behavior of the window in the two VI

  • hpqwmiex Module stopped working

    I have problems, I cannot and could not update anything on my computer in about 2 weeks.  I followed many suggestions and it still does not work.  Belongs to this peoblem Module why?  What should I do, how do I do if I start getting updates again? Br