Making a login system

Making a login system with flex.
i have registration in one panel and login in another panel,
basicly in the same application,
But since il be calling the same username i register, i can
only use the same id for that input feild in both REGISTRATION and
LOGIN but i get a 'identifier already in use' , cant get my head
for a work around.
please help
using something like this
http://www.vipercreations.com/tutorials/Adobe%20Flex/28.html

ntsii can u give me an example for declaring a textInput with
an id at application level then refrencing it
my code
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="
http://www.adobe.com/2006/mxml"
layout="absolute">
<mx:states>
<mx:State name="Logged In">
<mx:SetProperty target="{panel1}" name="width"
value="95%"/>
<mx:SetProperty target="{panel1}" name="height"
value="95%"/>
<mx:RemoveChild target="{password}"/>
<mx:RemoveChild target="{username}"/>
<mx:RemoveChild target="{label1}"/>
<mx:RemoveChild target="{Submit}"/>
<mx:RemoveChild target="{label2}"/>
<mx:SetProperty target="{panel1}" name="title"
value="Members Section"/>
<mx:AddChild relativeTo="{panel1}"
position="lastChild">
<mx:Label x="10" y="10" text="Welcome to the Members
Section!"/>
</mx:AddChild>
<mx:AddChild relativeTo="{panel1}"
position="lastChild">
<mx:Label x="10" y="36" text="Here you can do great
things, like join the forums @ Viper Creations!"/>
</mx:AddChild>
<mx:AddChild relativeTo="{panel1}"
position="lastChild">
<mx:Label x="10" y="62" text="Label"/>
</mx:AddChild>
</mx:State>
</mx:states>
<mx:Script>
<![CDATA[
import mx.rpc.events.ResultEvent;
import mx.controls.Alert;
]]>
</mx:Script>
<mx:Script>
<![CDATA[
private function checkLogin(evt:ResultEvent):void
if(evt.result.loginsuccess == "yes")
currentState = "Logged In";
if(evt.result.loginsuccess == "no")
mx.controls.Alert.show('Invalid username/password');
]]>
</mx:Script>
<mx:HTTPService id="login_user"
result="checkLogin(event)" showBusyCursor="true" method="POST"
url="
http://www.phobos-machines.com/login/bin/request.php"
useProxy="false">
<mx:request xmlns="">
<username>
{username.text}
</username>
<password>
{password.text}
</password>
</mx:request>
</mx:HTTPService>
<mx:Panel resizeEffect="Resize" width="250" height="200"
layout="absolute" title="Login System" horizontalCenter="0"
verticalCenter="-2" id="panel1">
<mx:Label x="10" y="10" text="Username:" id="label1"/>
<mx:TextInput x="10" y="36" id="username"/>
<mx:Label x="10" y="66" text="Password:" id="label2"/>
<mx:TextInput x="10" y="92" id="password"
displayAsPassword="true"/>
<mx:Button x="10" y="122" label="Submit" id="Submit"
click="login_user.send();"/>
</mx:Panel>
<!--registraion -->
<mx:HTTPService id="login" showBusyCursor="true"
method="POST" url="
http://www.phobos-machines.com/login/bin/request.php"
useProxy="false">
<mx:request xmlns="">
<username>
{username2.text}
</username>
<password>
{password2.text}
</password>
</mx:request>
</mx:HTTPService>
<mx:Panel x="30" y="10" width="380" height="270"
layout="absolute">
<mx:Form x="10" y="19" width="328" height="187">
<mx:FormItem label="username">
<mx:TextInput id="username2" width="100%"/>
</mx:FormItem>
<mx:FormItem label="Password">
<mx:TextInput id="password2" width="100%"
displayAsPassword="true"/>
</mx:FormItem>
<mx:FormItem>
<mx:Button label="Submit"
click="login.send(),Alert.show('User Registered',
'Registration',mx.controls.Alert.OK);"/>
</mx:FormItem>
</mx:Form>
<mx:FormHeading x="0" y="0" label="Registration"/>
</mx:Panel>
</mx:Application>

Similar Messages

  • Login System Fails to Validate

    I'm making a multiple level login system, with an 'inlog.html', 'check.jsp' and 'page.jsp', in which 'check.jsp' is obviously the validation part.
              if (logincode == persoon && hexString.equals(password) && level == 2){
                   out.println("Ok.");                    
              }else{
                   out.println("Nee.");
              }This is the validation if-statement, which should give the 'Ok.'-output when I input the data I used.
    I tested all the variables (logincode, persoon, hexString, password and level), and this was the result:
    1001
    1001
    32e6eb252301d344c188b94a8fe5f2cd
    32e6eb252301d344c188b94a8fe5f2cd
    2
    So all items match, but why is the else-part executed, instead of the if-part? Everything matches, so it should give me the 'Ok.' output.
    Anyone?

    Fantastic tip!
    It says that 'out.println(hexString.equals(password));' is false, though I have no clue why..
    Output:
    32e6eb142601d344c188b94a8fe5f2cd
    32e6eb142601d344c188b94a8fe5f2cd
    false
    %><BR/><%
         out.println(hexString);
         %><BR/><%
         String ww = rs.getString("Wachtwoord");
         out.println(ww);     
         %><BR/><%
         out.println(hexString.equals(ww));
         %><BR/><%
              if (logincode == persoon && hexString.equals(ww) && level == 2){
                   out.println("Ok.");                    
              }else{
                   out.println("Nee.");
              }Any clue as to what I'm doing wrong?

  • Making a login that will direct to a file/url based on unique id

    This may be the wrong forum, and I apologize if so.... I have a flash website for my photography business and I would like to make a link I have to "Client Photos" redirect to a specific clients files/folder with thier unique id and/or password. Currently I send them to another URL alltogether where I have my shopping cart set up and hosted, but they see a long list of folders/thumbnails and have to click on thiers then enter a password. This is set up thru zenfolio so I didnt have to do any coding for the password. I already have the link on my flash site, I am just wondering if someone can point me to a good tutorial on php/mysql (i assume this is the best method as a database will be required) that addresses this without having to spend 6 months becoming a php expert first. I am pretty familiar with dreamweaver CS3 and have built dozens of html/css static sites, some javascript stuff, but this level of interactivity is all new to me.
    Basically this is the flow needed:
    1. Client clicks link on flash site, and is taken to a login page (would like to use an xhtml/css page for this instead of flash because many clients use iphones, so i can give them all the same url to login page also, bypassing flash site they cant see if on a mobile device)
    2.this page will be styled like my site so its seamless looking and will have two form fields so client can enter thier last name as a login and a password I assign
    3. when this data is entered the database (i assume) will have a url stored that is a gallery of thier images and open this in a new browser tab/ window
    I am a complete newb at this sort of thing and want to learn instead of just being handed code, so ANY help is greatly appreciated. Most photographers websites I see have a feature like this so I assume its not an uncommon thing, however when I ask other photographer friends how they did it, none of them have a clue because they paid someone else to build thier site or it was already included in a template...

    You're in the right forum now. I have moved this thread to the Dreamweaver Application Development forum, which deals with PHP/MySQL and other server-side issues.
    What you want to achieve is relatively simple with Dreamweaver's User Authentication server behaviors. The Dreamweaver help files have a section on Building a login page. There's also a tutorial in the Adobe Developer Connection on setting up a PHP testing environment.
    Out of the box, the Dreamweaver login system sends everyone to the same page, but it's relatively easy to tweak the code to send people to individual pages. You can ask here for more help once you've got the basic system set up. You might also find my book "The Essential Guide to Dreamweaver CS4 with CSS, Ajax, and PHP" smooths out a lot of the process for you. It has a complete chapter on building a user login system, including the database end. It also shows how to redirect users to individual pages.

  • SQL injection on login system by Adobe?

    Hello everybody!
    I recently bought a wonderful book "Adobe Dreamweaver CS5 with PHP - Training from the source" by Daivid Powers.
    In the book is described how you can create a login system.
    What I would like to ask is: Have the dreamweaver server behaviors any kind of protection against SQL injection?
    Unfortunately I do not know PHP in order to recognize the code generated by server behaviors and be able to answer this question by myself..
    I just want to know how safe is to publish a website based on the dreamweaver server behaviors..
    Thank you in advance!

    Any form values and inbound URL parameters will be sanitized (via the function GetSQLValueString) based on several criteria:
    a) generally applied sanitizing functions: stripslashes, mysql_real_escape_string
    b) in case of a numeric value (integer, double) the function GetSQLValueString will additionally apply the PHP function intval respectively doubleval

  • How to write the SQL codes  of the login system for a database system

    If I have a table stored with a Column staff_ID and Password. How can I make use of this 2 columns information to setup the login system?

    Hi,
    Create Table Modules          -----e.g. payroll, inventory etc.
    (ModID    NUMBER(10),
    ModName  VARCHAR2(50)); 
    Create Table Modules_Forms    ------e.g. Sales Transaction Form
    (FormID   NUMBER(10),
    ModID    NUMBER(10),
    FmxName  VARCHAR2(32));           
    Create Table Modules_Reports  ------e.g. Sales Report
    (RepID    NUMBER(10),
    ModID    NUMBER(10),
    RepName  VARCHAR2(32));           
    Create Table Usr              ------------From the Employee Information Module
    (UserID   VARCHAR2(20),       ------------you can find the designation of
    Password VARCHAR2(10)        ------------the user who wants to connect
    Emp_Code Varchar2(25));      ------------that is why, I am Addng Emp_Code.
    Create Table User_Modules     ------------Control the Module Access.
    (UserID   VARCHAR2(20);
    ModID    NUMBER(10),
    Access   VARCHAR2(1));
    Create Table User_Forms       ------------Control the Forms Access
    (UserID   VARCHAR2(20),
    FormID   NUMBER(10),
    Read     VARCHAR2(1),
    Write    VARCHAR2(1),
    Execute  VARCHAR2(1),
    Delete   VARCHAR2(1));
    Create Table User_Reports     ------------Control the Report Access
    (UserID   VARCHAR2(20),
    RepID    NUMBER(10),
    Access   VARCHAR2(1));
    1 ) After Creating these Tables, Control the Application Access of the users
        From the application (Oracle Forms).
    2 ) I think you should create a Menu from oracle forms.
    3 ) For Controlling the Database Level Access, you can create a ROLE
    4 ) Forms Forum Site:-
        http://www.forums.oracle.com/forums/forum.jsp?forum=82Regards
    Muhammad Waseem Haroon
    [email protected]

  • How to create a login system

    I need to create a login system for an application.  The application will be a Flex front-end connecting to a Postgres database through ColdFusion.  I can connect to my database but cannot find a good way to check user credentials and save data in a session.  Can someone provide some sample code or suggestions (I have already reviewd Bruce Phillips blog on the subject).  I assume this is a standard activity in Flex but cannot find a lot of guidance.  Any help would be appreciated.  Details follow:
    The use case is quite simple:
    Assumptions:
    -the user has an account and supplies correct information
    -Flex can connect to the Postgres databse through ColdFusion datasource.
    Actions:
    User supplies username, password and role and clicks submit button.  System validates that the username/password/role combination matches and displays a viewstack based on the role provided.
    Thanks!

    After some more seraching and playing around, I found a pretty useful example out there on the Flex Cookbook beta site.
    The post by stinasius is located at http://www.adobe.com/cfusion/communityengine/index.cfm?event=showDetails&postId=12346&prod uctId=2&loc=en_US

  • Adf security login system

    Hi I would ask you for advice.
    I have a case:
    1.     On the weblogic are specified users:
    2.     I must make login system which will verified is user exist on weblogic.
    I have seen Franks tutorial http://download.oracle.com/otn_hosted_doc/jdeveloper/11gdemos/AdfSecurity/AdfSecurity.html but it is case where I manually add users to jazn file.
    I must verified users form weblogic.

    jazn-data.xml is used during development (when you are testing on the integrated WLS).
    When you deploy to an external WLS server, it will (or at least can) use the users defined in the WLS's LDAP
    Have you read [url http://docs.oracle.com/cd/E26098_01/web.1112/e16182/adding_security.htm#BGBGJEAH]the docs?

  • How to make a login system using xCode?

    Hello guys!
    I'm trying to make a login system;
    Is it possible to make it like this:
    Put a text box for the username and password and a label called "Sign in"
    How can I make so that the username and password box get's my input box on my PHP website and that "Sign In" will be the Submit?
    I don't want to use the HTTP way...
    Thank you !

    Thanks for your answer !
    Before I made this topic I tried to find a tutorial here and I didn't find any...
    Can you please redirect me to one of them?
    Thank you

  • Can I create a login system in Form Central?

    Dear,
    I am looking for an online program where you can create a professional online forms but protected with a login system. Can this with Adobe Form Central or collaboration with another program? I have been working already with dreamweaver.
    With friendly greetings

    Hi,
    You may create a web site and embed your forms into web pages and then use Dreamweaver to create a log in page.
    Thanks,
    Wenlan

  • Crating login System useing DC

    I want to make a application for domain users. can any buddy tell me how can create a login system which checkes the user/password from domain controler so all the users who has domain account can login in this system.

    Hello all,
    Just so you know... you are not alone!
    We are experiencing this exact same issue. Domain in mixed mode with 2003 R2 DC and 2012 R2 DC.
    We have a case with MS.
    It seems the issue occurs on Windows 2008 R2 only (in fact it happened to a Windows 8.1 also)
    It occurs after computer account reset password and the only way to fix is a reboot.
    We are working with MS at the time and they tell us they have other case in progress with same issue. But that it is really difficult to reproduce. In fact, in our environnement, we are not able to reproduce. It happens here and there without warning.
    So if any of you have a step-by-step recipe we can follow to reproduce each and every time.... please share! It could help a lot MS engineers.
    I'll try to keep you posted.
    David

  • Secure Login System

    I know that this might be quite simple to advanced PHP users and CSS coders but I am new to that sort of thing. Although I am very advanced in HTML and with computers in general, and dreamweaver, but I am confused on how I would go about adding in a secure login system for my sites users to use and a member area for their profiles they can use and such. I have done a lot of looking around and research on how to do this and all I have seem to find are terrible youtube videos on how to do MSQL which is doesnt really comply with DW, and other numerous sites offering paid for exstentions for such a thing.
    Is there any easy way to do this such as somone who has (or can) write a easy to cpy and paste code that allows this. I know that sounds weak and lazy but I dont understand any other way to do this. Im kinda on a low budget which is why I make websites in the firstplace. So if anyone can lead me in the right direction or just help me in some or any way at all i would really appreciate it.
    Thanks.

    The Dreamweaver Help files contain instructions on how to build a login system. There's also an online tutorial by Sherri German (a very reliable writer on Dreamweaver). Sherri's article is based on the original release of the user authentication server behaviors as a Dreamweaver extension. The server behaviors are now built into Dreamweaver, so you don't need an extension.

  • User login system

    I'm building a simple user login system with the following desired functionality.
    Main vi called Login.vi (attached below) offers the user the chance to login to a previously created account by entering their username and password or alternatively the user can create a new account which will ask them to enter a number of details, name, age, height etc.
    If the user has an existing account and wants to access this account, the program flow goes to Validate.vi when Login boolean is true which authenticates their entered username and password.
    Else the user creates a new account when "I'm New" boolean is true, then program flow should go to add user.vi (attached below). Here lies my problem... I'm not sure how to close Login.vi front panel when "I'm New" boolean is true and hence open add user.vi front panel.
    I'm convinced the solution is simple enough so I'm sure someone with more experience can point me in the right direction.
    Thanks,
    Strokes 
    Solved!
    Go to Solution.
    Attachments:
    Login.vi ‏35 KB
    Add User.vi ‏37 KB
    Save User.vi ‏24 KB

    I've attached the final two sub vi's that are part of my main vi entitled Login.vi which is attached above.
    Strokes
    Attachments:
    Validate User.vi ‏21 KB
    Load User.vi ‏26 KB

  • Trouble building login system

    Perhaps this questions is best posed to David Powers, but I'm having some problems with my login system for a site that I'm building with the assistance of "The Essential Guide To Dreamweaver CS4".
    I believe that I have followed his instructions, but when I login using a valid username and password entered into my "users" table in my database, I get redirected to the failed login page.
    I'm using encrypted passwords, and I believe that I have encrypted the password for the login attempt so that it should match the encrypted password in my table.
    Below is the code for my login page:
    <?php require_once('../Connections/aibAdmin.php'); ?>
    <?php
    if (isset($_POST['password'])) {
        $_POST['password'] = sha1($_POST['password']);
    if (!function_exists("GetSQLValueString")) {
    function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
      if (PHP_VERSION < 6) {
        $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
      $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
      switch ($theType) {
        case "text":
          $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
          break;   
        case "long":
        case "int":
          $theValue = ($theValue != "") ? intval($theValue) : "NULL";
          break;
        case "double":
          $theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
          break;
        case "date":
          $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
          break;
        case "defined":
          $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
          break;
      return $theValue;
    ?>
    <?php
    // *** Validate request to login to this site.
    if (!isset($_SESSION)) {
      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 = "content_priv";
      $MM_redirectLoginSuccess = "/admin/users/register.php";
      $MM_redirectLoginFailed = "/admin/login.php";
      $MM_redirecttoReferrer = true;
      mysql_select_db($database_aibAdmin, $aibAdmin);
      $LoginRS__query=sprintf("SELECT username, password, content_priv FROM users WHERE username=%s AND password=%s",
      GetSQLValueString($loginUsername, "text"), GetSQLValueString($password, "text"));
      $LoginRS = mysql_query($LoginRS__query, $aibAdmin) or die(mysql_error());
      $loginFoundUser = mysql_num_rows($LoginRS);
      if ($loginFoundUser) {
        $loginStrGroup  = mysql_result($LoginRS,0,'content_priv');
        //declare two session variables and assign them
        $_SESSION['MM_Username'] = $loginUsername;
        $_SESSION['MM_UserGroup'] = $loginStrGroup;        
        if (isset($_SESSION['PrevUrl']) && true) {
          $MM_redirectLoginSuccess = $_SESSION['PrevUrl'];   
        header("Location: " . $MM_redirectLoginSuccess );
      else {
        header("Location: ". $MM_redirectLoginFailed );
    ?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Administrator Login</title>
    </head>
    <body>
    <h1>Administrator Login</h1>
    <form action="<?php echo $loginFormAction; ?>" method="POST" name="admin_login" id="adminLogin">
      <p><label for="username">Username:</label>
      <input type="text" name="username" id="username" /></p>
      <p><label for="password">Password:</label>
      <input type="password" name="password" id="password" /></p>
      <input name="submit_button" type="submit" id="submitButton" value="Log In" />
    </form>
    </body>
    </html>
    Any assistance would be greatly appreciated. I'm also eager to learn more, so if there is literature that someone might be willing to suggest, that would be most appreciated as well.
    Thanks!

    Proper Prior Planning Prevents Poor Performance.
    Building a (close to) state of the art machine takes information and patience.
    Components that worked on your previous system will not work on your new one.
    The power supply must have 2 mother board connectors.
    BEFORE YOU RUSH OUT TO BUY A NEW ONE ----
    Make a list of what you plan on having in your new system now and 12 months from now.
    Ok, got the list?
    Find a post from "DANNY"
    Go to the power supply capacity link
    Fill it in
    Buy a power supply that matches your current and future requirements.
    Best of luck

  • Help needed in making a login screen

    hi all,
    i need to make a login screen in flash in which a user enters
    a password and username and both are checked from an xml file. i
    need your help in making it. could anyone redirect me to some
    tutorial or if anyone can post the code here, i would really be
    grateful to you. thanks,
    gaurav

    First you need to load the xml file that contains the list of
    user names and passwords into variables using actionscript.
    Use this tutorial.
    http://www.actionscript.org/tutorials/intermediate/XML/index.shtml
    Then compare the value entered by the user with the list of
    usernames and passwords.
    But be aware:
    1>All the processing happens on the client machine
    2>Extremely insecure if you are after a secure login.
    3>and when you update the XML file it won't necessarily
    take effect immediately on all the user's machines as they may be
    using a cached version of it.
    Ideal method is to use server side validation script using
    asp, asp.net, jsp or php.

  • BOE XI 3.1 Designer Login System Name

    Hello.
    When I login to designer, I enter the system name, which is the BOE server. If I export a universe to my local machine, the .unv file is exported to a physical file and the BOE server name is included in the path name. In both designer login and the file path, is it possible to use a name other than the BOE server, something more friendly? I've looked through documentation and the forums and can't find the answer.
    System info:
    Product: BO XI 3.1 SP2 - Java with Tomcat
    OS: Windows Server 2003 Standard Edition SP2
    Database: SQL Server 2005
    Thank you. Nancy

    Hi Nancy,
    1. While logging into BO You should give the CMS name in 1st text box(System), then only you can access BO Designer/DeskI/WebI.
    2. If I undestand correctly you can import a universe from repository to local system and can place it any where. By default it will save in Universes folder. You can change the default path in Tools Menu.
    Cheers,
    Suresh Aluri.

Maybe you are looking for