Senior & Expert PHP Developers Discussion Forum by Nyros Technologies

HIRE PHP Expert Developers Programmers Coders From India
PHP .Net Ruby on Rails Developers Community, Nyros Technologies, Kakinada
 
Log in  or IF not a member please REGISTER
Username:
Password:   


Keyword
Log in | Profile 

2 issues with integrated login/logout on site homepage.

 
Post new topic   Reply to topic    Senior & Expert PHP Developers Discussion Forum by Nyros Technologies Index -> phpBB
View previous topic :: View next topic  
Author Message
NeoTez



Joined: 27 May 2009
Posts: 2

PostPosted: Wed May 27, 2009 10:56 am    Post subject: 2 issues with integrated login/logout on site homepage. Reply with quote

Hello,

I'm have my forums located at www.mysite.com/forums and and trying to have a login/logout box on www.mysite.com

Here is the code I am using:


<?php

define('IN_PHPBB', true);
$phpbb_root_path = '../forums/';
$phpEx = substr(strrchr(__FILE__, '.'), 1);
include($phpbb_root_path . 'common.' . $phpEx);

// Start session management
$user->session_begin();
$auth->acl($user->data);
$user->setup();

if($user->data['is_registered'])
{
echo("Hi " . $user->data['username'] . "!    <a href=" . $phpbb_root_path . 'ucp.php?mode=logout&redirect=login.php' . '&sid=' . $user->data['session_id'] . ">Logout?</a>");
}
else
{
echo('<br><form action="/forums/ucp.php" mode="login" method="post" enctype="multipart/form-data">
<label for="username">Username: </label><input type="text" name="username" size="10" />
<label for="password">Password: </label><input type="password" name="password" size="10" />
<input type="hidden" name="redirect" value="login.php" />
<input type="submit" value="Login" name="login" />
</form>');
}
?>

login.php is located in the forum root.

Problem 1:

The redirect to login.php after login works fine, but the redirect to login.php after logout doesn't work. It just redirects to the forum main.

Problem 2:

I need these 2 redirects to be instant, instead of showing the normal PHPbb login/logout pages first. This is because I am putting the login.php file in an iframe on my homepage. How can I make them instant redirects?

Thanks in advance,

Paul
Back to top
View user's profile Send private message
samir



Joined: 12 Nov 2007
Posts: 232

PostPosted: Fri May 29, 2009 12:12 pm    Post subject: Reply with quote

paul , do u mean that you need a single login and logout , so that when you logout from the mail site you automatically logout from the froum and vice versa?????
Back to top
View user's profile Send private message
NeoTez



Joined: 27 May 2009
Posts: 2

PostPosted: Fri May 29, 2009 7:01 pm    Post subject: Reply with quote

No, I just want a login/logout box on my main site that provides the same functionality as the main PHPbb one.
Back to top
View user's profile Send private message
samir



Joined: 12 Nov 2007
Posts: 232

PostPosted: Mon Jun 01, 2009 7:25 am    Post subject: Reply with quote

ok , then you need to maintain separate login / logout for your main site , and a separate login / logout for the forum site. i dont undertstand the use of iframe in the login page.............!
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Senior & Expert PHP Developers Discussion Forum by Nyros Technologies Index -> phpBB
Page 1 of 1

 latest topics 
 Topics   Replies   Author   Views   Last Post 
No new posts Problem to create a folder in my server
1 samir 8 Mon Mar 15, 2010 7:32 am
rajkumar View latest post
No new posts cake php
1 Mike 15 Mon Mar 15, 2010 6:07 am
rajkumar View latest post
No new posts query in many table..how to read it
0 mun 11 Sun Mar 14, 2010 8:03 am
mun View latest post
No new posts search data in many table
0 mun 9 Sun Mar 14, 2010 7:57 am
mun View latest post
No new posts HipHop for PHP is now opensource
0 venkatadapa 13 Sat Mar 13, 2010 7:08 am
venkatadapa View latest post
No new posts Get the status from twitter using PHP script
0 Thirupathi 10 Fri Mar 12, 2010 8:57 am
Thirupathi View latest post
No new posts music portal script
0 realcoder 11 Thu Mar 11, 2010 8:42 pm
realcoder View latest post
No new posts DataExporter.php anybody make or tell
0 realcoder 14 Thu Mar 11, 2010 8:33 pm
realcoder View latest post
No new posts Email sending through PHP program
1 kumar1116 60 Thu Mar 11, 2010 10:29 am
AnilKumar View latest post
No new posts Php script to display the days between two dates?
1 Thirupathi 67 Thu Mar 11, 2010 9:09 am
Mike View latest post





Hire an expert PHP developer / coder / programmer or development team from India now!!

Other Forums : Ruby on Rails   ::   .Net   |   Free unlimited HTML CSS Joomla Wordpress Drupal templates download

Nyros Technologies   |   Developers Blog   |   Kakinada City Portal   |   About PHP Experts   |   More