OS : Windows NT 4.0
Web server : Netscape Enterprise server
CGI scripts : Perl
Note : Not using Java script or VB script.
Problem description :
I have to add record to the database. From two different place user can come to add screen, after user pressing commit button it has to go back to the previous screen from where it came to add screen.
By pressing submit button (only) one script will be called this script should handle commit of the record to the database as well to generat the previous screen. How to do this ?
If I keep all the code required to generate the previous screen in the add-commit scripts it is not good way of doing it.
Other way is, in add-commit script execute the respective script (previous scripts). If it is good way then can any one tell me how to do it in perl script with small example ?.
Add-commit script has to do,
1. Validate the form fields (add screen's)
2. If error, generate add screen again and exit
3. If correct, insert a record to database
4. Generate previous screen (dynamically) by executing that script in add-coomit script.
Doubt : Is one perl script can execute another perl script in the CGI scripting without any problems (like security) ?
other good solution are expecting from experts with implementation details.