[dancer-users] Redirect with scalar value

Richard Reina gatorreina at gmail.com
Sun Aug 23 20:20:25 BST 2015


I have the following post that gets a user's selection from a
page then looks up the corresponding record for the selection.


 post '/mypage' => sub { # let user make a selection        my
$select_id = params->{sportselect};        print "\n\nLooks Like They
Selected No: $select_id\n\n";

    # take them to the add_sport (but somehow with selected no    hook
'before' => sub {         var sport_id => $select_id;
request->path('/sport_add')    };}get '/sport_add' => sub {    my
($selID) = splat; #         print "In sport_add we got: $selID as the
chosen number\n";    }
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.preshweb.co.uk/pipermail/dancer-users/attachments/20150823/a496a282/attachment.html>


More information about the dancer-users mailing list