Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: CGI HTML Form Data

by hippo (Bishop)
on Apr 20, 2021 at 08:04 UTC ( [id://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?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (6)
As of 2024-04-16 17:38 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found