Using a from field to create URL

Ask a Question related to Dreamweaver AppDev, Design and Development.

  1. #1

    Default Using a from field to create URL

    I am using PHP and MySQL database. I have created a login that validates
    username and password against the database. I want to direct the user to a
    certain URL based on their username. Is it possible to:-


    Taffydog Guest

  2. Similar Questions and Discussions

    1. Forms: Text field - auto fill another field?
      Someone PLEASE help me... how do i structure a form so that when text is entered into one field, it auto-fills other fields on the form that are...
    2. Acrobat Stalls When I Try To Create A Fillable Field
      I just discovered that neither my 7.0.8 Acrobat Professional nor my 6.0.2 will allow the creation of fillable fields. I've tried different PDFs but...
    3. Create a variable using form field
      Hello everyone, I am very new to ColdFusion and I am not sure if this is the right place to post this question. I am in the process of buidling...
    4. Defined text field in form -> subject field in e-mail
      Hi, I have a form on my web site which users send to me by mailto-function. I would like the text they write in a particular text field to...
  3. #2

    Default Using a from field to create URL

    I am using PHP and MySQL database. I have created a login that validates
    username and password against the database. I want to direct the user to a
    certain URL based on their username. Is it possible to:-
    1. Use the username field of the login form or database to finish the URL ie
    username is john21 finished urk woudl be [url]http://www.homepage/admin/john21.php[/url]
    2. Alternatively could I create a new field in the database with the complete
    URL and use that to direct the user

    Failing that how can I direct a specific user to a specific page

    This is the login verification code

    $loginFormAction = $_SERVER['PHP_SELF'];
    if (isset($accesscheck)) {
    $GLOBALS['PrevUrl'] = $accesscheck;
    session_register('PrevUrl');
    }

    if (isset($_POST['Username'])) {
    $loginUsername=$_POST['Username'];
    $password=$_POST['Password'];
    $MM_fldUserAuthorization = "";
    $MM_redirectLoginSuccess = "admin/SPECIFIC URL.php";
    $MM_redirectLoginFailed = "loginfailed.php";
    $MM_redirecttoReferrer = false;
    mysql_select_db($database_conTest, $conTest);

    Help please

    Taffydog Guest

  4. #3

    Default Re: Using a from field to create URL

    Taffydog wrote:
    > $MM_redirectLoginSuccess = "admin/SPECIFIC URL.php";
    Change the above line like this:

    $MM_redirectLoginSuccess = "admin/{$loginUsername}.php";

    By the way, I see you're using the Dreamweaver User Authentication
    server behavior, which breaks on most recent versions of PHP. You may be
    interested in reading my analysis and solution here:

    [url]http://friendsofed.infopop.net/2/OpenTopic?a=tpc&s=989094322&f=8033053165&m=3241024 21&r=324102421#324102421[/url]

    --
    David Powers
    Author, "Foundation PHP 5 for Flash" (friends of ED)
    Co-author "PHP Web Development with DW MX 2004" (Apress)
    [url]http://computerbookshelf.com[/url]
    David Powers Guest

  5. #4

    Default Re: Using a from field to create URL

    Cheers,
    I do have code for user authentification but as this my first attempt at a
    dynamic site I thought I would use the built in stuff. Will check out your
    link when my brain works again.

    Brian

    Taffydog Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

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 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139