lip9000 Posted May 13, 2009 Share Posted May 13, 2009 I have a site that is integrated with phpBB forum and at the moment, when a user logs into my site, they then have to go into the forum and click login, re-enter their username and password, and click login to be logged into the forum. The form to login to the phpBB forum is like this: <form action="./forum/ucp.php?mode=login" method="post"> <h3><a href="./forum/ucp.php?mode=login">Login</a> • <a href="./ucp.php?mode=register">Register</a></h3> <fieldset> <label for="username">Username:</label> <input type="text" name="lg_name" id="lg_name" size="10" title="Username" /> <label for="password">Password:</label> <input type="password" name="lg_pass" id="lg_pass" size="10" title="Password" /> <input type="submit" name="login" value="Login" /> </fieldset> </form> Is there a way to somehow submit this form with the same username and password that the users enter on my sites homepage, at the same time? So for example when the user logs in, it also logs into the forum, since the username and password is the same. I've tried to include forum/ucp.php and insert the post variables but I can't get it right. Quote Link to comment https://forums.phpfreaks.com/topic/157910-submitting-a-form-in-the-background-possible/ Share on other sites More sharing options...
Maq Posted May 13, 2009 Share Posted May 13, 2009 Are the user's credentials shared between phpBB and your site? Quote Link to comment https://forums.phpfreaks.com/topic/157910-submitting-a-form-in-the-background-possible/#findComment-832977 Share on other sites More sharing options...
sKunKbad Posted May 13, 2009 Share Posted May 13, 2009 you can use cURL Quote Link to comment https://forums.phpfreaks.com/topic/157910-submitting-a-form-in-the-background-possible/#findComment-832986 Share on other sites More sharing options...
lip9000 Posted May 13, 2009 Author Share Posted May 13, 2009 Yes they are, but I have found the solution, but have run into another problem. I have just found out that there is already a login function for the forum that gets activated on site login, but the only problem is that the session id needs to be in the URL in order for you to be logged into the forum. So if I go to forum.mysite.net once I am logged in, it will say that I am not logged in, but if I go to forum.mysite.net/?sid=thisisthelongsessionid, then it shows me logged in. Is there a way to change it so that users can just go to forum.mysite.net without having to enter the session id into the url? Quote Link to comment https://forums.phpfreaks.com/topic/157910-submitting-a-form-in-the-background-possible/#findComment-832989 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.