ChronoEngine.com homepage

Forums

Please write a review for the extension you are using on the Joomla extensions directory before posting a new question as we are being spammed by many negative reviews.

Thank you for your support!

Redirecting to an event in PHP

itpates 12 Sep, 2018
I have a drop-down, and am trying to set up a function to redirect to an event based on the input from the drop-down using a simple PHP switch in Custom Code. However, shortcode like
{redirect:event_name} 

is not working. I feel like this should be a trivial thing but have not found any solution in my search. Example code below;
<?php

$foo= $this->data['data1'];
switch ($foo) {
case 1: {redirect:event1};
break;
case 2: {redirect:event2};
break;
case 3: {redirect:event3};
break;
default: {redirect:index};
break;
}
?>
itpates 12 Sep, 2018
Made it work using the Switch function.
healyhatman 13 Sep, 2018
Shortcodes don't work in PHP, just for future reference.
This topic is locked and no more replies can be posted.

2Checkout.com

2CheckOut.com Inc. (Ohio, USA) is an authorized retailer for goods and services provided by ChronoEngine.com