vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   redirect after a $_REQUEST['do'] action (https://vborg.vbsupport.ru/showthread.php?t=68675)

Tekton 08-24-2004 05:43 PM

redirect after a $_REQUEST['do'] action
 
In my php code, I have an action section that happens when you do...

www.here.com/stuff.php?do=buy

when that happens, it does some functions that run fine, I'd just like it to return back to regular stuff.php after that happens so they can refresh without accidently re-buying what they just did. Any way to do that all in one php page? I wanted to keep the file amount to a minimum. :)

Also, redirecting with a header() can't be used.

Thanks.

AN-net 08-24-2004 05:46 PM

use vb's redirect function?

Tekton 08-24-2004 06:00 PM

Sorry I wasn't aware it had one. :P

Is it like redirect() or something?

Colin F 08-24-2004 06:01 PM

meaning this:

PHP Code:

exec_header_redirect("buy.php?$session[sessionurl_js]"); 


AN-net 08-24-2004 06:05 PM

or this:
PHP Code:

eval(print_standard_redirect('phrasename')); 


Tekton 08-24-2004 06:12 PM

Warning: Cannot modify header information - headers already sent by (output started at /home/site/www/here.php:427) in /home/site/www/includes/functions.php on line 2836

on Colin's.

Colin F 08-24-2004 06:19 PM

Do it near the beginning of the file :)

Or just use standard_redirect (See AN-net's code).
Be aware that you'll have to add a phrase in the redirect group with the name you enter for "phrasename", if you have redirects turned on in your forum.

Tekton 08-24-2004 06:21 PM

Never added a redirect group phrase before... ^^;;;

It just needs to redirect to www.here.com/buy.php

EDIT - If I could change the do= to do=main and then make the page refresh that would be even better :P

Tekton 08-24-2004 09:33 PM

just to update, I got it working with

eval(print_standard_redirect('phrasename'));

Thanks AN-net and everyone else too of course. Almost got all the help I need to finish this thing. :)

mfarmerhi 08-05-2005 02:11 AM

Quote:

Originally Posted by Tekton
just to update, I got it working with

eval(print_standard_redirect('phrasename'));

Thanks AN-net and everyone else too of course. Almost got all the help I need to finish this thing. :)

for print_standard_redirect's, where do you enter the new phrase name and text for it to show? (e.g. global phrases? Font in redirects?)


All times are GMT. The time now is 03:54 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.01402 seconds
  • Memory Usage 1,727KB
  • 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
  • (2)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete