in reply to my code does not work

I agree with ww. Let CGI handle the parsing and use ->param to the value of the fields.