[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

How to generate and download multiple documents at one time in PHP or MODX

Posted on 2016-10-06
3
Medium Priority
?
100 Views
Last Modified: 2016-10-13
Hi,
I have a course booking site where students and agents are able to book courses.
The agents are able to book a course on the student's behalf.
e.g.
Student 1 - booked direct
Student 2 - booked via agent 1
Student 3 - booked via agent 1
Student 4 - booked via agent 2
Student 5 - booked direct
Student 6 - booked via agent 2
Student 7 - booked via agent 3

After the course is finished, I need to generate invoices to each agent who has booked a student on that course.
What I would like to be able to do is to click a button and 3 Word or Excel invoices are generated and downloaded. (one for each agent)

I would prefer if they were not downloaded as part of a zip file, as I think this will confuse the admin staff (and owner :-)  )

Is there a way to do this, either in MODX or PHP?

Thanks in advance.
Steve Reid
0
Comment
Question by:Steven Reid
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 59

Accepted Solution

by:
Julian Hansen earned 2000 total points
ID: 41831765
Option 1
Generate multiple window.open('path/to/document') - one for each document.
This will result in multiple tabs / windows opening - each with its own download.

Option 2
Generate an intermediary page with the links to the docs on them.
0
 

Author Closing Comment

by:Steven Reid
ID: 41841762
Thank you Julian, both great ideas.
0
 
LVL 59

Expert Comment

by:Julian Hansen
ID: 41841780
You are welcome.
1

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
Originally, this post was published on Monitis Blog, you can check it here . In business circles, we sometimes hear that today is the “age of the customer.” And so it is. Thanks to the enormous advances over the past few years in consumer techno…
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
Suggested Courses

650 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question