Redirect Question

3 posts by 2 authors in: Forums > CMS Builder
Last Post: November 19, 2014   (RSS)

By nmsinc - November 18, 2014 - edited: November 18, 2014

I have a need to redirect users based on a record field. If the field has a value; let's say that value equals "redirect.php"

I need that value to be added to the end of the header URL script below - how can this be done?

Thanks - nmsinc

<?phpif($table1Record['redirect']):?>

<?php header('Location: https://website.com/'); exit;?>

<?phpendif; ?>

nmsinc

By claire - November 19, 2014

All you should need to do is add the redirect to the end of the header location, like so:

<?php if($table1Record['redirect']):?>

<?php header('Location: https://website.com/'.$table1Record['redirect']); exit;?>

<?php endif; ?>

This assumes that $table1Record['redirect'] is 'redirect.php'. Does that make sense?

--------------------

Claire Ryan
interactivetools.com

Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/