View Full Version : login form

09-15-2005, 07:42 PM
hi i have a problem with login form

i have a forum and i want to make a login form at my home page so u can login from home pahe to Forum

i made 2 forms username and password and a submit button

this is the code:

<FORM action="Forum/login.php" method="POST">
<TABLE cellpadding="0" cellspacing="5" border="0">
<TD><INPUT type="text" name="username" maxlength="20"></TD>
<TD><INPUT type="password" name="password" maxlength="10"></TD>
<div align="center"><input class="text" type="checkbox" name="autologin" />
<INPUT type="hidden" name="fromar" value="true">

<INPUT type="submit" value="Login">

and when i try to login from main page it goes to my login page on forum and im not loged in..i cant login from main page

can u help me

if u need demo account please let me know

09-15-2005, 11:44 PM
please post the PHP code that processes your HTML form.....

09-16-2005, 09:04 AM
thats the problem i dont have one i only have this code on my page....

can u tell me what code do i need


09-16-2005, 09:24 AM
It depends on the forum you use. What forum do you use?

09-16-2005, 09:29 AM
i use phpbb
i have made my login form on my front page...when i try to login to forum from front page it shous me login page of the forum

i have to login from there

09-16-2005, 05:32 PM
Replace this : <INPUT type="hidden" name="fromar" value="true">

<INPUT type="submit" value="Login">

With :

<input type="hidden" name="redirect" value="" />

<input type="submit" name="login" value="Log in" />

09-16-2005, 10:50 PM
i tried this and still not workong

it goes to login.php but it wont login from this form

it says u have entered wrong username or password please try again

can someone help me


this is the login form

and test account is

demo / demo

try it yourself

09-16-2005, 11:48 PM
demo and demo aren't even working from the forums...I'd say it's REALLY the wrong password or username...

09-16-2005, 11:51 PM
sorry i cretaed account accidently dmeo

now i changed it

it is demo / demo

please check again

09-16-2005, 11:57 PM
it working now

this was the problem

i tried to enter the forum with my username "ljićpu"

and on the main page it doesnt recognise this special character "ć"

so i tried with this username and it workes "ljiŠpu"

sorry all for this

p.s. how can i add to this form to accept this characher

09-17-2005, 04:07 AM
Maybe, in the PHP code, you could put use a str_replace() for the letter?

I'm not sure if it'd work...and I don't know the variables by heart, but it'd be something like...

$_POST['username'] = str_replace('ć', 'Š', $_POST['username']);