Webmastersite.net
Register Log In

inquiry
a way to redirect according to user selection

Comments on inquiry

peumus
Forum Regular

Usergroup: Customer
Joined: Aug 09, 2004
Location: Chile

Total Topics: 172
Total Comments: 462
peumus
Posted Oct 28, 2007 - 12:39 PM:

Paul,

Is is a way to redirect a member to a custom page after submitting a link, only in the case this member has entered a specific value for a variable ?
Paul
developer

Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California

Total Topics: 61
Total Comments: 7868
Paul
Posted Oct 29, 2007 - 11:58 AM:

In the redirect template,
<?php if (strpos("{CURRENTURL}", "suggest.php?filled=1") && $_REQUEST['action'] == 'addlink') { ?>
<meta http-equiv="refresh" content="3;url=custompage.php" />
<?php } else { ?>
the normal redirect
<?php } ?>


Only works if you don't bypass redirects.
peumus
Forum Regular

Usergroup: Customer
Joined: Aug 09, 2004
Location: Chile

Total Topics: 172
Total Comments: 462
peumus
Posted Oct 29, 2007 - 10:41 PM:

Thanks,
I change the 'strstr' with 'strpos' and used:
strpos('{CURRENTURL}', 'suggest.php?action=addlink&filled=1'

And it's working perfect.

Also I have deleted
<a href="{DESTINATION}">{LANG_REDIRECT_CONTINUE}</a>

as {DESTINATION} does not changes to the new redirect.
Paul
developer

Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California

Total Topics: 61
Total Comments: 7868
Paul
Posted Oct 30, 2007 - 8:35 AM:

If action=addlink always gets sent in the URL (hadn't checked) it can be simplified to a conditional:
<IF {CURRENTURL} contains suggest.php?action=addlink&filled=1>
<meta http-equiv="refresh" content="3;url=custompage.php" />
<OTHERWISE>
the normal redirect
</IF>
Search thread for
Download thread as
  • 0/5
  • 1
  • 2
  • 3
  • 4
  • 5



This thread is closed, so you cannot post a reply.