<div dir="ltr"><pre>I have the following post that gets a user's selection from a <br>page then looks up the corresponding record for the selection.<br><br><br> <a name="14f5b822a85ea9bc_l-6"></a>post '/mypage' => sub { # let user make a selection
<a name="14f5b822a85ea9bc_l-7"></a>
<a name="14f5b822a85ea9bc_l-8"></a> my $select_id = params->{sportselect};
<a name="14f5b822a85ea9bc_l-9"></a>
<a name="14f5b822a85ea9bc_l-10"></a> print "\n\nLooks Like They Selected No: $select_id\n\n";
<a name="14f5b822a85ea9bc_l-11"></a><br><br>
<a name="14f5b822a85ea9bc_l-12"></a> # take them to the add_sport (but somehow with selected no
<a name="14f5b822a85ea9bc_l-13"></a> hook 'before' => sub {
<a name="14f5b822a85ea9bc_l-14"></a> var sport_id => $select_id;
<a name="14f5b822a85ea9bc_l-15"></a> request->path('/sport_add')
<a name="14f5b822a85ea9bc_l-16"></a> };
<a name="14f5b822a85ea9bc_l-17"></a>
<a name="14f5b822a85ea9bc_l-18"></a>}
<a name="14f5b822a85ea9bc_l-19"></a>
<a name="14f5b822a85ea9bc_l-20"></a>get '/sport_add' => sub {
<a name="14f5b822a85ea9bc_l-21"></a>
<a name="14f5b822a85ea9bc_l-22"></a> my ($selID) = splat; #
<a name="14f5b822a85ea9bc_l-23"></a>
<a name="14f5b822a85ea9bc_l-24"></a> print "In sport_add we got: $selID as the chosen number\n";
<a name="14f5b822a85ea9bc_l-25"></a>
<a name="14f5b822a85ea9bc_l-26"></a>}</pre></div>