I have this website that I am making which has a main page and then others including forums. I used a template for the mainpage and it has a login box for username and password, and also forgot password and register links. I don't really know how to connect the box to the one in the forums. In other words how do I allow visitors of the main page to fill in the box and login the forums which are elsewhere, on a subdomain to be precise? Thanks for any help, in the form of a "how to" or link to an informative webpage or tutorial.
Do you have a link to this? It should be pretty easy.. just changin the where it's posting the data to . Cheers Marc
wow, fast response! The links are soccer site where the box is and soccer forums where it should post the data. And I already tried to look into the code and there's no post, I guess that it'll have to be added! PS: Scotland? Rangers or Celtic?
so let me get this right u want the login box on the main site to actually log people into the forums?
Exactly! In other words I want people that go to main page to be able to login to forums directly. A login shortcut. Thanks for any help!
i Dont have that much experience with php but in theory the login form should be passing information to the database used by your forum what usually happens is the login forum will pass the username text field information and the password text field information to another script to check if the user is allowed to log in in the case of your forum other information is passed too - like "log me in automatically and hide my presence" i would open the forum login page in a html editor to find out the names of the fields used (make a note of them) and also the name of the page the form submits the information too you would then need to edit your current form to include 2 hidden fields - i.e loginme automatically value and hide my presence ) you would need to rename your form text boxes to match those on the actual forum and then change the url it redirects too
<form action="./ucp.php?mode=login" method="post" id="login"> <div class="panel"> <div class="inner"><span class="corners-top"><span></span></span> <div class="content"> <h2>Login</h2> <fieldset class="fields1"> <dl> <dt><label for="username">Username:</label></dt> <dd><input type="text" tabindex="1" name="username" id="username" size="25" value="" class="inputbox autowidth" /></dd> </dl> <dl> <dt><label for="password">Password:</label></dt> <dd><input type="password" tabindex="2" id="password" name="password" size="25" class="inputbox autowidth" /></dd> <dd><a href="./ucp.php?mode=sendpassword">I forgot my password</a></dd><dd><a href="./ucp.php?mode=resend_act">Resend activation e-mail</a></dd> </dl> <dl> <dd><label for="autologin"><input type="checkbox" name="autologin" id="autologin" tabindex="4" /> Log me on automatically each visit</label></dd> <dd><label for="viewonline"><input type="checkbox" name="viewonline" id="viewonline" tabindex="5" /> Hide my online status this session</label></dd> </dl> <dl> <dt> </dt> <dd><input type="hidden" name="redirect" value="index.php" /> <input type="hidden" name="sid" value="a04b660282c8bbedc3ec282d3bff1792" /> <input type="submit" name="login" tabindex="6" value="Login" class="button1" /></dd> </dl> </fieldset> Code (markup): You would need to edit your current page this line in particular <input style="font-size: 8pt; background-color: white; border: solid #000000 1px" type="text" name="Username" size="13"><BR><img src="images/x.gif" height="5"><BR><input style="font-size: 8pt; background-color: white; border: solid #000000 1px" type="text" name="Password" size="13"><BR></td><td valign="top"><img src="images/x.gif" height="24"><br><a href="#"><img src="images/login.jpg" border="0"></a></td></tr></table><img src="images/x.gif" height="1" width="73">forgot password? | register</td></tr></table><table width="779" align="center" cellspacing="0" cellpadding="0"><tr><td height="5" background="images/nav_bg.jpg"><!-- <a href="#"><img src="images/news_1.jpg" hsrc="images/news_2.jpg" border="0"></a> Code (markup): your text boxes should be within a form like the code on your forum <form action="./ucp.php?mode=login" method="post" id="login"> ./icp.php? should be something like http://forum.neothsl.info/ucp.php?mode=login
you should use css for your site instead of styling everything right inside the html tags, example: instead of doing this <input style="font-size: 8pt; background-color: white; border: solid #000000 1px" type="text" name="Username" size="13"> Code (markup): do this <input type="text" name="Username" size="13"> Code (markup): input { font-size: 8pt; background-color: white; border: solid #000000 1px; } Code (markup): makes your code much easier to read, and understand.