Forums

Redirect based on radio select

fkararm65 31 Jan, 2012
HI,

I wrote a custom code to redirect the user to a different url based on a radio box selection. It works fine but realized it does not pass the session data because it is probably a redirect issue.

What I really want to do is have two different actions based on the radio button selection and submit button:

Radio button 1 - Go tot thank you page and be able to pass session data.
Radio button 2 - go to paypal and pass session data to fill in the fields.

I can make this work as a one on one pointer using the current options but am not sure how to approach the conditional requirements.

any help would be appreciated.



Current Redirect CODE
<?php

$mainframe =& JFactory::getApplication();

if($form->data['input_payment_method'] == 'Online Payment')
{
$mainframe->redirect('http://www.paypal.com');
}
else if($form->data['input_payment_method'] == 'Mail-In Payment')
{

$mainframe->redirect('http://www.usps.gov');

}
?>
This topic is locked and no more replies can be posted.