Results 1 to 7 of 7
  1. #1
    Join Date
    Sep 2014
    Posts
    4

    Unanswered: choose certain database results and render them into Word or PDF

    I have a basketball practice drill database using MySQL with web pages containing php. The database results are obtained using a dropdown of key words and then a secondary dropdown filter. so you could get any number of results depending on the choice. I would like to build the functionality in which I could choose different specific results and render them into a Word doc or PDF. This could entail choosing 1 item on a page, then doing a new search and choosing a 2nd item.. so searching and getting a number of results. I am not saying just all the results rendered on a single search. If someone can help or guide me.

  2. #2
    Join Date
    Jan 2007
    Location
    UK
    Posts
    11,434
    Provided Answers: 10
    What part are you stuck with:
    - Writing the MySQL query?
    - Writing the PHP that shows the results of said query?
    - Creating a PDF in PHP? (FPDF )
    George
    Home | Blog

  3. #3
    Join Date
    Sep 2014
    Posts
    4

    all of the above

    I don't how to conceptually begin. I know the functionality should allow a user to choose an individual item.. retain it a the search continues and once a user has selected the desired number of returns, send it to a word.

    So the code or functionality for selecting a particular return
    storing the choice while searching for more
    formatting and creating a usable document
    the database also has images for each drill. I mean the database stores the path to the images

  4. #4
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    send it to word, well that could be tricky.. it means bridging the remote server / locla client protocols. your applciation is in PHP running on a remote server, and the user wants to upload data into their local instance of word.

    but here's what you could do
    email a copy of the data to the user as an attachment, could be as a CSV or PDF, CSV is far easier but a PDF is doable)

    as an alternative what you could do is write a PHP page and then save that as HTML for local consumption

    or write a complete PDF document

    of the 3 writing a PHP page which is saved locally is probably the easiest
    after that attaching a CSV is the next easiest
    writing to PDF requires using a suitable library such as FPDF (if you are adventurous or the more limited PDF functions within PHP
    I'd rather be riding on the Tiger 800 or the Norton

  5. #5
    Join Date
    Sep 2014
    Posts
    4

    further

    I understand the part about getting to a format. But I will need help with the actual ability for a user to choose entries, hold them while continuing to search and choose others on different page, and then generate what you are talking about.

    I can take the easiest or best option but getting there is my issue right now.

  6. #6
    Join Date
    Sep 2014
    Posts
    4

    choosing

    I guess the key thing to start is how to have a user choose a specific result from a page of results... hold that while continuing to search even when a new page loads. does this allow a user to "check" a box next to the entry for holding. And once the user has selected say 10 drills, they can push a "generate page" button? This is the premise. But again, holding the choices even when going to a new page from a new search.

  7. #7
    Join Date
    Jan 2007
    Location
    UK
    Posts
    11,434
    Provided Answers: 10
    I'm going to move this to the PHP topic.



    Passing values between PHP pages is relatively easy. I'd recommend you go and read up about session variables.
    George
    Home | Blog

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •