1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Login box redirected

Discussion in 'HTML & Website Design' started by teamboston, Mar 19, 2008.

  1. #1
    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.

    :)
     
    teamboston, Mar 19, 2008 IP
  2. Marc Fraser

    Marc Fraser Peon

    Messages:
    283
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Do you have a link to this? It should be pretty easy.. just changin the where it's posting the data to ;).

    Cheers
    Marc
     
    Marc Fraser, Mar 19, 2008 IP
    teamboston likes this.
  3. teamboston

    teamboston Guest

    Messages:
    205
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #3
    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? :)
     
    teamboston, Mar 19, 2008 IP
  4. Marc Fraser

    Marc Fraser Peon

    Messages:
    283
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #4
    No Celtic or Rangers... Dunfermline acutally ;).

    Anyway, your links aren't working... lol..
     
    Marc Fraser, Mar 19, 2008 IP
  5. SibTiger33

    SibTiger33 Peon

    Messages:
    203
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #5
    shouldnt be hard to do at all mate

    but we need links first :)
     
    SibTiger33, Mar 19, 2008 IP
  6. teamboston

    teamboston Guest

    Messages:
    205
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #6
    teamboston, Mar 20, 2008 IP
  7. SibTiger33

    SibTiger33 Peon

    Messages:
    203
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #7


    so let me get this right


    u want the login box on the main site to actually log people into the forums?
     
    SibTiger33, Mar 20, 2008 IP
  8. teamboston

    teamboston Guest

    Messages:
    205
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #8
    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!
     
    teamboston, Mar 20, 2008 IP
  9. SibTiger33

    SibTiger33 Peon

    Messages:
    203
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #9
    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
     
    SibTiger33, Mar 20, 2008 IP
  10. SibTiger33

    SibTiger33 Peon

    Messages:
    203
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #10
    <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>&nbsp;</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
     
    SibTiger33, Mar 20, 2008 IP
    teamboston likes this.
  11. teamboston

    teamboston Guest

    Messages:
    205
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #11
    OK, I'll look into it and hopefully I'll get it!

    :)

    Thanks so much for your time!
     
    teamboston, Mar 20, 2008 IP
  12. SibTiger33

    SibTiger33 Peon

    Messages:
    203
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #12
    not a problem

    just let me know if you need any more help
     
    SibTiger33, Mar 21, 2008 IP
  13. X.Homer.X

    X.Homer.X Peon

    Messages:
    290
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #13
    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.
     
    X.Homer.X, Mar 21, 2008 IP