View Full Version : redirect after a $_REQUEST['do'] action
Tekton
08-24-2004, 06:43 PM
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, 06:46 PM
use vb's redirect function?
Tekton
08-24-2004, 07:00 PM
Sorry I wasn't aware it had one. :P
Is it like redirect() or something?
Colin F
08-24-2004, 07:01 PM
meaning this:
exec_header_redirect("buy.php?$session[sessionurl_js]");
AN-net
08-24-2004, 07:05 PM
or this:
eval(print_standard_redirect('phrasename'));
Tekton
08-24-2004, 07: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, 07: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, 07: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, 10: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, 03:11 AM
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?)
Guest190829
08-05-2005, 03:20 AM
Front End redirects. :)
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.