Results 1 to 10 of 10

Thread: Login Screen Memory?

  1. #1
    Join Date
    May 2004
    Posts
    41

    Default

    Probably a stupid question, but here goes. On my old website "Login Screen" the Username field lists all the agents as I add(ed) them, so when I return to that page another day I just need to pick the agent from the drop down and enter a password. The new website (using the open-realty code) the Username field doesn't remember each agent. I haven't been able to locate any code that would allow this. Am I missing something?

    Thanks

  2. #2
    Join Date
    Jul 2003
    Location
    California
    Age
    42
    Posts
    4,229

    Default

    Nope, you're not missing anything. Open-Realty doesn't do that.
    Open-Realty 2 Documentation

    ~The Difference Between an ORDEAL and an ADVENTURE is ATTITUDE~

  3. #3
    Join Date
    May 2004
    Posts
    41

    Default

    Okay thanks. It's obviously nothing serious, I was just curious.

  4. #4
    Join Date
    Apr 2004
    Location
    Montague, CA
    Posts
    78

    Default

    That is a really good idea though, I wonder how hard it would be to do something like this???

  5. #5
    Join Date
    Jan 2003
    Posts
    201

    Default

    Seems like it should be simple. Just build query to select users from userDB and store the values in a drop down.

    *CODE UNTESTED

    Code:
    <?php
    $sql = "SELECT user_name from " .$config&#91;table_prefix&#93;. "UserDB";
    $rs=$conn->Execute&#40;$sql&#41;;
    if &#40;$rs === false&#41; log_error&#40;$sql&#41;;
    ?>
    <select name="user_name">
    <?php
    while&#40;!$rs->EOF&#41; 
    &#123;
    	$username=$rs->fields&#91;user_name&#93;;
    	print "<option value=\"$username\">$username</option>";
    $rs->MoveNext&#40;&#41;;
    &#125;
    ?>
    </select>

  6. #6
    Join Date
    May 2004
    Posts
    41

    Default

    Thanks Andre, I'll try that out first chance I get.

  7. #7
    Join Date
    Apr 2004
    Location
    Montague, CA
    Posts
    78

    Default

    I tested the code that Andre posted and with some minor changes I got it to work.

    I changed Andre's code to this:
    Code:
    //modification - dropdown menu for username
    $sql = "SELECT user_name from " .$config&#91;table_prefix&#93;. "UserDB"; 
    $rs=$conn->Execute&#40;$sql&#41;; 
    if &#40;$rs === false&#41; log_error&#40;$sql&#41;;
    echo "<p>$lang&#91;admin_login_name&#93;&#58; <select name=\"user_name\">";
    echo "<option selected>- Please Select</option>";
    while&#40;!$rs->EOF&#41;
    &#123;
    $username=$rs->fields&#91;user_name&#93;;			
    echo "<option value=\"$username\">$username</option>"; 
    $rs->MoveNext&#40;&#41;; 
    &#125;			
    echo "</select></p>";
    //end mondification - dropdown menu for username
    Put the above code in place of this code:
    Code:
    echo "<p>$lang&#91;admin_login_name&#93;&#58; <input type=\"text\" name=\"user_name\"></p> ";
    on lines 20 and 153 in the main.php file.

    Hope that helps...

  8. #8
    Join Date
    May 2004
    Posts
    41

    Default

    It works perfectly! Thanks so much to both Andre and Repustech. I truely appreciate the help.

  9. #9
    Join Date
    Mar 2004
    Location
    België
    Posts
    92

    Default

    what if there are many users?
    When a user saves his search he is also listed in userdb.
    The list can become very long...
    Maybe you should add "where isAgent = Yes" , so that only agents are listed?

  10. #10
    Join Date
    Apr 2004
    Location
    Montague, CA
    Posts
    78

    Default

    janc,

    That is a wise concern, but for my site looking through a list to find your login is much easeir than typing it in.

Similar Threads

  1. Login
    By RealtyOne in forum Feature Request (CLOSED)
    Replies: 7
    Last Post: 09-10-2004, 12:28 AM
  2. Login Loop Problems
    By Acezone in forum HELP (CLOSED)
    Replies: 59
    Last Post: 06-04-2004, 08:04 AM
  3. Replies: 2
    Last Post: 05-25-2004, 05:21 PM
  4. changing the look of the login message
    By tito in forum HELP (CLOSED)
    Replies: 2
    Last Post: 04-26-2004, 01:42 PM
  5. 1.1.5b, login admin, few seconds later need login again
    By Ivan2004 in forum HELP (CLOSED)
    Replies: 1
    Last Post: 03-08-2004, 03:15 PM

Bookmarks

Posting Permissions

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