2015-09-16 16:46 GMT-05:00 Andrew Solomon <andrew@geekuni.com>:Hi RichardFirstly with the GET request when you click on thisyour route handler will be something like this (note ':' instead of '$'):get '/reset/:token' => sub {return template 'pass_reset' => {token => params->{token}};};This template views/pass_reset.tt will contain something like<form action="/reset/[% token %]" method="post"><input type="password" name="password1"><br/><input type="password" name="password2"><br/><input type="submit" value="Submit"></form>and back in the controller on clicking submit, it will be handled bypost '/reset/:token' => sub {# do something to check params->{password1} eq params->{password2} ...};(Please imagine the code above is scribbled on a blackboard - I haven't run it:)AndrewHi Andrew,Thank you for the reply. For the value of token in the url '/reset/:token' do I first set the value of token withmy $token = get_token(); # subroutine that returns generated token
session username => $token;
so that it matches the urlJiOk49ld9oekdisJkflSS3ed link that was sent to the user in the email?
_______________________________________________
dancer-users mailing list
dancer-users@dancer.pm
http://lists.preshweb.co.uk/mailman/listinfo/dancer-users