Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    Regular Coder
    Join Date
    Dec 2005
    Posts
    141
    Thanks
    0
    Thanked 0 Times in 0 Posts

    PHP logs into multiple sites (new windows)

    Summary

    I am making a portal which users log into. Everything is pointing to a DB, Tables are linked to other tables.

    EX.

    Tables
    portal_users
    email_users
    ticket_users


    I am trying to set it up. where the User logins into the Portal, clicks on the link that states its EMail, or Ticket.

    It will then look at the portal_users ID, to match to email_users ID, to pull the correct Users UN and PASS.

    ___

    How can I make my portal log users into an external site, such as our OWA

  • #2
    Senior Coder
    Join Date
    Mar 2003
    Location
    Atlanta
    Posts
    1,037
    Thanks
    14
    Thanked 30 Times in 28 Posts
    Look into using cURL Also, make sure whoever sites you are trying to log in via the portal allows it.
    Most of my questions/posts are fairly straightforward and simple. I post long verbose messages in an attempt to be thorough.

  • #3
    Regular Coder
    Join Date
    Dec 2005
    Posts
    141
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I have setup a Way so far, I havent started using this method after logging into my portal yet,, but im just demoing IDs in the URL... so sessions will keep track of the data


    PHP Code:
    <?php
    $email_id
    =$_GET['email_id'];
    $user="demo";
    $password="baby";
    $database="owa_email";
    mysql_connect(localhost,$user,$password);
    @
    mysql_select_db($database) or die( "Unable to select database");
    $query=" SELECT * FROM users WHERE email_id='$email_id'";
    $result=mysql_query($query);
    $num=mysql_numrows($result);
    mysql_close();
    $i=0;
    while (
    $i $num) {
    $user_name=mysql_result($result,$i,"user_name");
    $pass_word=mysql_result($result,$i,"pass_word");

    $i++;
    }
    ?>
    Code:
    <FORM action="https://owa.atlarge.net/exchweb/bin/auth/owaauth.dll" method="POST" name="logonOWA" autocomplete="off" target="_blank">
     <INPUT type="hidden" name="destination" value="https://owa.atlarge.net/">
     <INPUT type="hidden" name="flags" value="0">
     <TABLE align="center" border="1" height="100" width="400" bordercolor="#cc66ff">
      <TR>
       <TD>
       <TABLE border="0" align="center" width="400" bordercolor="#cc66ff" height="150">
        <TR>
         <TD colspan="2">
         <P align="center"><U><FONT>Only use First initial Last name</FONT></U></P>
         </TD>
        </TR>
        <TR>
         <TD align="right"><FONT>FLast:</FONT> </TD>
         <TD>
         <INPUT type="text" id="username" name="username" size="25" maxlength="256" value="<?php echo $user_name; ?>"></TD>
        </TR>
        <TR>
         <TD align="right"><FONT>Password:</FONT> </TD>
         <TD>
         <INPUT type="password" autocomplete="off" id="password" name="password" size="25" maxlength="256" value="<?php echo $pass_word; ?>">
         </TD>
        </TR>
        <TR>
         <TD colspan="2" align="center">
         <INPUT type="submit" value="Check your eMail" id="SubmitCreds" name="SubmitCreds"></TD>
        </TR>
        </TD>
       </TABLE>
       </TD>
      </TR>
     </TABLE>
    </FORM>

    Now thats working, so, I already have my portal that can be logged into
    So all im needing to figure out.

    A way for, after you login, Portal_ID=# says in the URL always.
    When you click link for. email, ticket, ftp, and so on.
    Ill have it load the form, with hidden boxes, in a frame, then lunch the site in a new window.

    Figuring out how to have my php look at the portal ID and say, 1 is 6 in email_id

  • #4
    Regular Coder
    Join Date
    Dec 2005
    Posts
    141
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I have figured out a great way to make this work

    if anyone needs anything similar please fill free to see me and PM or email


  •  

    Posting Permissions

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