![]() |
Redirecting to another php page
Looking for help with code logic
Trying to code logic in group.php file to check for value of a variable. If the variable is empty or not set then automatically redirect to another php page. Is it possible ? Could some one help me here please |
What variable? It is possible, but you need to choose a hook where the variable would exist.
|
First thanks for replying.
As new group is created, I would like to check the input code variable which is part of the URL as group.php?do=create&code=12345 Would like to check this code variable, if blank or not set redirect to starting php file |
Hook into that file as early as possible (probably group_start?), and redirect.
|
Thanks for pointing the hook I should be using.
But I am looking for the exaxt syntax of redirect php code which I should be coding. Regards |
Use the header() function to issue the redirect (and make sure you exit the script right after the header() call.
http://www.php.net/manual/en/function.header.php |
Thanks a million, You are great
|
All times are GMT. The time now is 08:47 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:
|