Forums

How to redirect to a download link

Ron 29 May, 2015
Hello Bob,

I need one more assistance from you. I have a form with a drop down option of catalogues that a site visitor may want to download when a visitor chooses from the drop down the relevant file is attached to his email with the below code:
    < ? php 
    switch ($_POST['download'])
    {
      case 'Glass Catalogue - 2015':
        $form->files['catalog'] = array(
          'path' => '/home/xxxx/public_html/cat/glass_.pdf'
        );
        break;
      case 'Cut Glass Catalogue - 2014':
        $form->files['catalog'] = array(
          'path' => '/home/xxxx/public_html/cat/cut_glass.pdf'
        );		                          
    }

    ?>


I want to modify this code that can redirect to the link directly tas per the dropdown choice made by the visitor. I have over 50 catalogs that can be chosen in the dropdown.

Thanks for all the help. Best wishes

Ronn
GreyHead 29 May, 2015
Hi Ronn,

You could use this same code to create a parameter to use in the ReDirect action.

I'm not certain that ReDirecting to a download link will work neatly???

Bob
Ron 29 May, 2015
Okay Bob. Thanks. I am going to give it a try.

Best wishes
Ron
Ron 31 May, 2015
Bob. It worked. Thanks for the hint.

Best wishes and God bless you

Ron.
This topic is locked and no more replies can be posted.