Link to home
Create AccountLog in
Avatar of hydrazi
hydrazi

asked on

PHP Data Import, Step through Pages

I am still new to PHP coding but I have a customer who has a php import system that process a CSV file.  They are orders from their website.  People need to look at the batch of orders from the CSV file and correct any weird issues.  

Currently, each record fills a form.  If there are 10 records, it prints 10 forms on the same page and is created using Do-While to create the forms until there are no more rows.  Once the form data looks good, they hit a submit button and the data is inserted into a MySQL DB.

I have created most of this system, and now they want to change it.

They want each order to create its own form on a single page, to be inserted one at a time, then a PDF made of each individual order data and printed then return to do it all again for each order in that CSV.

I am lost in how to start this.  Any pointers to tutorials on a similar thing or just a general direction.... I don't even know the right words to use to do a google search.  Thanks for any help you can provide!
ASKER CERTIFIED SOLUTION
Avatar of maeltar
maeltar
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer
Avatar of hydrazi
hydrazi

ASKER

Awesome, that's definitely going to work for that part!  Thank you!  
My biggest gap of knowledge is creating a way to have a single record on a page, then submit it, print it and then return to the next record in the CSV!  Is this called a session?
SOLUTION
Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
Avatar of hydrazi

ASKER

I think pagination just makes it so the page isn't too long, right?
I am looking to do this for each record in a CSV file:

1.  Display single record in a form and make changes.
2.  Hit submit button to insert into database
3.  Go directly to a PDF file made with that single record.  Print it.
4.  Hit button to go back and display next record in CSV file.  Steps 1-3 until there are no more orders in CSV file.
Pagination is more commonly used when there are too many records for one page yes,
 but you can paginate for each record without any problems...

SOLUTION
Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
Avatar of hydrazi

ASKER

oooooo..... Ajax.... I have not Ajax before.  I must research this new Kung Fu.
Avatar of hydrazi

ASKER

This might be too big of a question.  I guess I am looking for how I would go about getting the CSV to stay a part of the session until it is all processed.