michael99 has asked for the wisdom of the Perl Monks concerning the following question:

Hi Monks, wish to get some idea from here.

I am going to use html to create a checkbox with multiple choices and submit button to display user's choice at the end (idea from https://www.w3schools.com/jsref/prop_checkbox_checked.asp). How could I use perl script to get the final display message from the html? I would need the message to dump into my current xml file. Any idea?

[Notes: I have a on-going script for pre-process, so I need to use the same script for post process].

2020-04-20 Athanasius linkified the w3schools href, de-linkified "Notes: ...", added paragraphs.

Replies are listed 'Best First'.
Re: Perl handle html checkbox
by Corion (Patriarch) on Apr 18, 2020 at 06:35 UTC

    Without seeing your code, it's hard to give you concrete advice.

    Processing HTML parameters is easy with, say, Mojolicious::Lite or simply CGI.

Re: Perl handle html checkbox
by marto (Cardinal) on Apr 18, 2020 at 07:56 UTC

    Your question doesn't feel like the whole picture. The Mojolicious framework is more than capable of dealing with any sort of input, processing and output (display on screen, post the XML somewhere). Mojolicious::Guides::Tutorial is a good place to start, in addition to your previous thread. Posting a more complete question, or the code you have which is causing you problems would give people more basis for advice. How do I post a question effectively?.

Re: Perl handle html checkbox
by NetWallah (Canon) on Apr 18, 2020 at 07:13 UTC
    Chapter 4 of cgi101 covers how to get variables from a web form, using CGI (But look at Alternatives at least for awareness).

    XML::LibXML can be used to insert data into your XML document, as shown in this stackoverflow article.

                    "Imaginary friends are a sign of a mental disorder if they cause distress, including antisocial behavior. Religion frequently meets that description"