Results 1 to 9 of 9

Thread: username and password

  1. #1
    Join Date
    Mar 2006
    Posts
    17
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default username and password

    I have 2 different aplications instaled on my server,how can i bind them togader so my user doesnt have to register again ???
    Basicly creat something to register a user for both aplications same time ?
    is that posible ???

  2. #2
    Join Date
    Sep 2006
    Location
    St. George, UT
    Posts
    2,769
    Thanks
    3
    Thanked 157 Times in 155 Posts

    Default

    Do the apps use a database to store the registration information (ie: username, password, etc). If your registration script inserts the values into a form, just make another query to the database to install the same values to the corresponding fields for the other app. Then again, it mostly all depends on what applications they are and if they use a database or not.

  3. #3
    Join Date
    Sep 2006
    Location
    Eureka, California
    Posts
    18
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    graf, what are the two different aps?

  4. #4
    Join Date
    Mar 2006
    Posts
    17
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    OK they are 2 very different aplications.
    1.is DragonflayCMS
    2.is Dolphin

    i want to connect them togather some how.

  5. #5
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    I have no idea what those are. How do they work/what do they do?
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  6. #6
    Join Date
    Sep 2006
    Location
    St. George, UT
    Posts
    2,769
    Thanks
    3
    Thanked 157 Times in 155 Posts

    Default

    As I have said before, if they use a database, simply make a php script that inserts the values of the registration script into both apps dbs. I have had to do that several times for some of my friends and it works perfectly.
    "Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music." - Kristian Wilson, Nintendo, Inc, 1989
    TheUnlimitedHost | The Testing Site | Southern Utah Web Hosting and Design

  7. #7
    Join Date
    Mar 2006
    Posts
    17
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    yes they are using a database.
    Please can you give me sample of that script which you have wroten for your friends,Can you please

  8. #8
    Join Date
    Sep 2006
    Location
    St. George, UT
    Posts
    2,769
    Thanks
    3
    Thanked 157 Times in 155 Posts

    Default

    all you need to do is look at the databases for each program, then make a form with the user input, then make the php script as follows:

    PHP Code:
    <?
    //form variables
    $username $_REQUEST[username];
    $password $_REQUEST[password];

    //add or edit to fit your needs

    $server "localhost"//server with database
    $db_user "test"//username for database
    $db_pass "test"//password for database
    $success_url "thankyou.html"//url to redirect user after registration is successful.

    $conn mysql_connect($server,$db_user,$db_pass);
    $adduser mysql_db_query("program1","INSERT INTO `users` 
       (`id`,
        `username`,
        `password`)  

     VALUES (NULL,
                 '
    $username',
                 '
    $password')");

    $adduser2 mysql_db_query("program2","INSERT INTO `users` 
       (`id`,
        `username`,
        `password`)  

     VALUES (NULL,
                 '
    $username',
                 '
    $password')");

    //change above to fit your needs

    if ($adduser && $adduser2) {
    header('Refresh: 1; url='.$success_url);

    echo 
    'The user was created successfully! You will be redirected shortly';

    //redirect user if successful.

    else {
    echo 
    'The user was NOT created successfully! Please go <a href="javascript: history.back(1)">back</a> and try again';

    //dont redirect, but display an error message.

     
    ?>
    if you need any help on this, let me know.
    "Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music." - Kristian Wilson, Nintendo, Inc, 1989
    TheUnlimitedHost | The Testing Site | Southern Utah Web Hosting and Design

  9. #9
    Join Date
    Mar 2006
    Posts
    17
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thank you very much,I hope i can do the rest

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
  •