![]() |
To redirect a user back to where he was when he logged in (instead of to the main forum page)...
Find: PHP Code:
PHP Code:
Find: PHP Code:
PHP Code:
|
Hey all, with this script, I have it currently on my site of www.defunction.net
And want to know, is there anyway of adding a link for looged in members to logout? As of yet, I have tried putting an <a href> link in there, but haven't been very sucsessfull. Any help, or advice would be great. |
Bump!
|
I have a problem with the include part at the top of the script... it takes me to the forum index.php instead of my regular homepage!
|
I get a parse error
Unexpected $ in line 170 when line 170 is </html> any ideas on that? |
MCAHill - This works excellent for me. Thank you so much for posting this. Solved a lot of my problems.
Question: How do you address the page when you enter a false ID or pass. I can't get it to go back to my homepage. thank you! T.H. |
I was having trouble using this method without generating errors. I found the solution and thought I would share it.
The code at the begining: <?php chdir("forum/"); require('./global.php'); chdir("../"); ?> This can cause problems if your vB uses a different DB since it connects to that DB and then returns but never reconnects to the orginial DB. This cause mysql fetch array errors for me. Add this line after the last chdir: mysql_select_db("your_mainDB_name_goes_here"); Should look like this now: <?php chdir("forum/"); require('./global.php'); chdir("../"); mysql_select_db("your_mainDB_name_goes_here"); ?> Next, make sure you have the same admin user for the forum DB also listed as a user in the main DB will all permissions. If not, create a matching forum admin account in your main DB. This should clear up any issues when using this with 2 DB's. Enjoy! :ninja: |
Hey, I installed this script, and it worked fine on the same domain... but I want this to work on a different domain than what the forum is on.
I have tried changing the directory for it to find the global.php like this: <? chdir("/home/vgcorec/public_html/forum"); require('./global.php'); chdir("/home/xbcore/public_html/"); ?> and I have also tried just running it on the vgcorec site and then using a php include on the xbcore site and it does not work right. It shows the login forms, but it will not detect that you are already logged in if you are. Also, the two sites are on the same server. Please help! :) |
this is great THANKS!! works lovely!
|
any idea how to fix this error i get
this is what the code looks like on my page PHP Code:
Code:
Parse error: parse error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/ross/public_html/login.php on line 11 |
All times are GMT. The time now is 12:37 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|