vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Redirecting to another php page (https://vborg.vbsupport.ru/showthread.php?t=203557)

Raman 01-30-2009 03:25 AM

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

Dismounted 01-30-2009 03:30 AM

What variable? It is possible, but you need to choose a hook where the variable would exist.

Raman 01-30-2009 03:53 AM

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

Dismounted 01-30-2009 04:52 AM

Hook into that file as early as possible (probably group_start?), and redirect.

Raman 01-30-2009 04:55 AM

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

Dismounted 01-30-2009 09:00 AM

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

Raman 01-30-2009 03:07 PM

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
  • Page Generation 0.01012 seconds
  • Memory Usage 1,714KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (7)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete