Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw

Re: CGI HTML Form Data

by hippo (Bishop)
on Apr 20, 2021 at 08:04 UTC ( #11131504=note: print w/replies, xml ) Need Help??

in reply to CGI HTML Form Data

So can I submit the form data to the same CGI Perl script? Or do I need to have one CGI for the HTML Form, and another CGI to process the form and save to the JSON file?

You can submit the form data to the same CGI Perl script. It is quite a common pattern for one script to act as both form generator and form handler for precisely this reason. There are also a whole bunch of tools on CPAN to help you accommodate this. I have used a combination of WWW::Form and WWW::FieldValidator to good effect but there are plenty of others too.


Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11131504]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (2)
As of 2022-05-27 02:17 GMT
Find Nodes?
    Voting Booth?
    Do you prefer to work remotely?

    Results (94 votes). Check out past polls.