I can tell you how I would do it in .Net and someone can probably then interpret the same concept for PHP.

In .Net you would probably use the DataGrid just like you do a subfile today.

When you post the results, you would loop through each line in the grid and call out to your stored procedure with appropriate data for the line item.

If anything fails, break out of the validation/post loop and show a message on screen.

I could be wrong but I don't think PHP has any built-in control sets, so maybe look at one of the Javascript grid frameworks for an idea or as you said look for the HTML elements server side when you do your POST and then loop thru the line data.

Regards,
Richard Schoen
RJS Software Systems Inc.
Where Information Meets Innovation
Document Management, Workflow, Report Delivery, Forms and Business Intelligence
Email: richard@xxxxxxxxxxxxxxx
Web Site: http://www.rjssoftware.com
Tel: (952) 736-5800
Fax: (952) 736-5801
Toll Free: (888) RJSSOFT
------------------------------

message: 2
date: Fri, 15 Feb 2013 10:56:14 -0500
from: Michael Ryan <michaelrtr@xxxxxxxxx>
subject: [WEB400] Best Practice to Send Data to i

I need to send a bunch of data to the i using PHP. I'm reworking a 5250 subfile program that presents a data entry subfile to the user. The user enters information into the subfile fields, presses enter, and the program then processes each entry in the subfile.

I want to do this process in HTML and PHP. I'm thinking of displaying an HTML table and then processing each row when the user POSTs the data. I want to call a stored procedure to validate the data in each row.

My first thought would be to send all the data to the stored procedure as a series of arrays, one for each column in the . The RPG developer (who will write the code that will become the stored procedure) is looking for basically a MODS as input. I want to keep the validation SP accessible from both RPG and PHP.

Any ideas? Thanks!



As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2022 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.