Remove this Banner Ad

A bit of html help..

🥰 Love BigFooty? Join now for free.

leonmagic

Norm Smith Medallist
Suspended
Feb 16, 2003
5,859
2
themagpiesnest.tk
Other Teams
Collingwood. Forever.
For anyone who knows, I'm looking to add a login part to my website, for the forum, like the following (green circle);

loginpic1.jpg


If someone could give me a hand with the coding for it, I'd be VERY gratefull. :)
The address to my forum is http://tmn.4.forumer.com if that helps.

Thanks in advance.

LM.
 
  • Thread starter
  • Banned
  • #3
Jim Boy said:
Hasn't that already got a login process??

Essentially though, you want a person to login, store the fact they are logged in via the session.

:confused: :confused:

I have no idea what your talking about.. :)

I tried copying the code from the forum, however it didn't work.

Basically, I was just wondering if anyone knew the code that could connect the login to the forum from my site, as is shown in the above pic.

Thanks for the reply though.
 
So what your saying is that when the person is logged into the forum, they are also logged into your site?

Are you using php or something for your site, or just html??

Looking at the forum, it's written in php and runs a session (cookie if you like). When a forum page loads, it will check that the session data to see if the user is logged in.

With your site, you could look at the same session data to avoid a user logging in twice, but that isn't going to happen if you are just using HTML.
 

Log in to remove this Banner Ad

  • Thread starter
  • Banned
  • #5
Jim Boy said:
So what your saying is that when the person is logged into the forum, they are also logged into your site?

Are you using php or something for your site, or just html??

Looking at the forum, it's written in php and runs a session (cookie if you like). When a forum page loads, it will check that the session data to see if the user is logged in.

With your site, you could look at the same session data to avoid a user logging in twice, but that isn't going to happen if you are just using HTML.

I'm only using html for my site.

My problem isn't that people are double logged in, I just need to know how to put the login box (the one from my forum) on to my website, so people can log into the forum straight from my site, as in the above pic.
 
leonmagic said:
I'm only using html for my site.

My problem isn't that people are double logged in, I just need to know how to put the login box (the one from my forum) on to my website, so people can log into the forum straight from my site, as in the above pic.

ok I think I'm with you now,

esssentially you just have form with a text box for the password and password field and a submit buttton, that 'action attribute of the the form should action should point towards the forum, although it doesn't necessarily have to be be on the same page. This can be changed by putting a 'target' attribute in the form tag.

I've just ripped the code straight from that web page and this can be stuck in your document, but make it look good first. There is also some javascript to validate the form

Anyway the relevant code is
Code:
<form action="http://tmn.4.forumer.com/index.php?act=Login&amp;CODE=01" method="post" name='LOGIN' onsubmit='return ValidateForm()'>
  <input type='hidden' name='referer' value="http://tmn.4.forumer.com/" />
  <p>User name 
    <input type='text' size='20' maxlength='64' name='UserName' class='forminput' />
  </p>
  <p>Password 
    <input type='password' size='20' name='PassWord' class='forminput' />
  </p>
  <p>
<input type="submit" name='submit' value="Log me in">
  </p>
</form>
<script language='JavaScript' type="text/javascript">
<!--
function ValidateForm() {
	var Check = 0;
	if (document.LOGIN.UserName.value == '') { Check = 1; }
	if (document.LOGIN.PassWord.value == '') { Check = 1; }
	if (Check == 1) {
		alert("Please enter your name and password before continuing");
		return false;
	} else {
		document.LOGIN.submit.disabled = true;
		return true;
	}
}
//-->
</script>
 
Did that work? If you actually want authentication, won't you need to use server side techs like CGI or SQL?
 

Remove this Banner Ad

A bit of html help..

🥰 Love BigFooty? Join now for free.

Back
Top