inquiry a way to redirect according to user selection
<?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 } ?>
strpos('{CURRENTURL}', 'suggest.php?action=addlink&filled=1'
<a href="{DESTINATION}">{LANG_REDIRECT_CONTINUE}</a>
<IF {CURRENTURL} contains suggest.php?action=addlink&filled=1><meta http-equiv="refresh" content="3;url=custompage.php" /> <OTHERWISE>the normal redirect </IF>
This thread is closed, so you cannot post a reply.
Comments on inquiry
Forum Regular
Usergroup: Customer
Joined: Aug 09, 2004
Location: Chile
Total Topics: 172
Total Comments: 462
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 ?
developer
Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California
Total Topics: 61
Total Comments: 7869
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.
Forum Regular
Usergroup: Customer
Joined: Aug 09, 2004
Location: Chile
Total Topics: 172
Total Comments: 462
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.
developer
Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California
Total Topics: 61
Total Comments: 7869
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>