Page 1 of 1

login

Posted: Tue Apr 01, 2008 6:00 pm
by sharky86
hi all! i have this code on a external page and for any reason it is not working. what happens is that i am redirected to the login page of the forums and there i am asked for user an pass.. without any error message.

any idea of what's wrong?

thank you

igor

Code: Select all

<form action="<?php echo($phpbb_root_path); ?>login.php" method="post" enctype="multipart/form-data"><br />
						<table border="0">
						<tr><td>Username:</td><td><input type="text" size="12" name="username"></td></tr><tr>
						<td>Password:</td><td><input type="password" size="12" name="password"></td></tr></table>
						Remember me:<input type="checkbox" name="autologin"><input type="hidden" name="redirect" value="/../index/main.php">
						<br /><br /><input type="submit" value="login" name="Login"><br />

						</form>

Re: login

Posted: Wed Apr 02, 2008 3:45 am
by Lumpy Burgertushie
sharky86 wrote:hi all! i have this code on a external page and for any reason it is not working. what happens is that i am redirected to the login page of the forums and there i am asked for user an pass.. without any error message.

any idea of what's wrong?

thank you

igor

Code: Select all

<form action="<?php echo($phpbb_root_path); ?>login.php" method="post" enctype="multipart/form-data"><br />
						<table border="0">
						<tr><td>Username:</td><td><input type="text" size="12" name="username"></td></tr><tr>
						<td>Password:</td><td><input type="password" size="12" name="password"></td></tr></table>
						Remember me:<input type="checkbox" name="autologin"><input type="hidden" name="redirect" value="/../index/main.php">
						<br /><br /><input type="submit" value="login" name="Login"><br />

						</form>

do you have this at the top of that page?

Code: Select all

<?php
define('IN_PHPBB', true);
$phpbb_root_path = '../yourphpbb/';//edit for your path to your phpbb folder
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.' . $phpEx);


// Start session management

$userdata = session_pagestart($user_ip, PAGE_INDEX);
init_userprefs($userdata);

Re: login

Posted: Wed Apr 02, 2008 11:39 am
by T0ny

Code: Select all

<input type="submit" value="login" name="Login">
You have the name & value the wrong way round. It should be

Code: Select all

<input type="submit" name="login" value="Login">