Jump to content

ginerjm

Members
  • Content Count

    5,172
  • Joined

  • Last visited

  • Days Won

    68

Everything posted by ginerjm

  1. And that hopefully has been corrected so as not to do that html output?
  2. Can you show us some of your fpdf code? Just a sample of 20-30 lines from one of your routines that generates the pdf file? Just want to make sure of something since I'm still trying to help you.
  3. Well - that's the problem as the messages tell you. Can't help you out - not familiar with any of this particular task.
  4. So he can't find whatever COM is. Is it a class? Is the class being loaded by any require or include? The errror reporting code is essential for picking up errors during the coding mode. Turn them off before putting into production.
  5. And WHAT IS that message? That's what I was asking you. You don't need an IDE to read a message in your browser. Or - if the functions themselves capture the messages the documentation for them should tell you how to display them during execution.
  6. FWIW - When I use FPDF I usually want the pdf document to just show up on a clean page of my web browser I use $pdf->Output(); That's all it takes.
  7. Assuming that you have written the code correctly and not made any typos, what is the problem with it? You aren't having success - so are there any messages coming back? For you to say it doesn't work sure can't help us to see what's wrong, assuming that it is written correctly.
  8. Again - let me try Your query will build a result set of all the data you need to report on. As you fetch each row (assuming mutiple ones for each person being reported) you will gather the data and use it to write out pieces of your pdf document. Read another row and build some more pdf output. When you recognize the need to end the first page do your addpage call and continue on with person until the second page is done. That will be noticed when the next fetch has a new userid key telling you to start the next person. Close out the current page that you just finished, reset the page number and start the new page (basically just an add page call with perhaps new headings). Hopefully you wrote your FPDF logic to simply write out your well-designed page using a set of data. You need to see that set of FPDF logic as the way to generate a report. Wrap that in something so that you can loop thru the query results, get all the data you need for the FPDF process and call it. This isn't rocket science. It just needs the proper design to collect data and to make the necessary FPDF function calls and a bit of php to recognize when a new page needs to be added and to recognize the start of a new person's data. (Please don't re-post this)
  9. I"ll try and contribute again and hope to get my point across. Write your query to select all of the people you want to report out. When you finally run that query, pass the results variable to your fpdf code script. Begin a loop there on those results that does the fetch for each record and let your fpdf code process it. When you loop finishes - close out your fpdf and send it to the client. Remember you CANNOT SEND ANYTHING TO THE CLIENT EXCEPT THIS CLOSED FPDF CONTENT. That's why you use two scripts - one to collect any arguments and do the query and report back any errors and the other to take the set of data and generate the fpdf output and actually do the outputting to the client. Whew! (Please don't re-post this post. Read it, digest it and go do the work.)
  10. Good luck. You are beyond my ability to help you. You seem to be a bit short on the education of how to program, read manuals, or experiment.
  11. Hundreds of records should not be a concern. Hint? No - you need to learn how to spec things out and then examine them. Enjoy!
  12. I"m going to let you think this out. I'm going to assume that you wrote a report that shows one person's data. So now you simply expand the query to generate multiple rows of data and use that in a loop to output each record on the pdf. Make sense? So look at YOUR code and do some re-thinking. As I said earlier - if you simply want to generate a person's data as one page of a report then add a page break after doing one guy and let the loop do all the work. It's all about doing your design homework before you sit down and begin coding. And please don't re-post this when you make your next post. Such a waste.
  13. I do not believe you can merge these files. One merges the DATA into one report. That's the thinking you need to do. If necessary you could simply do a page break in it after each person's info is printed.
  14. I"m thinking that if you simply changed the query that grabs the data so that it grabs everyone the pdf reporting should be the same. If you thought about it beforehand that is. There's an awful lot of thought that goes into this business. Try a little.
  15. How about generating the complete report instead one report for each person?
  16. PHP code to the screen? That means you are missing the php tag perhaps. Or even that you haven't named your file as a .PHP file.
  17. YOu have to start paying attention to the error messages and line numbers. The answer is always pretty close to what it says.
  18. Altho keeping a password in a file may not be the best idea. Hopefully it is a php file. And not stored in the web tree.
  19. Read a SQL manual for the functions available to be used in a query. Research! Feeling magnanimous - here: https://dev.mysql.com/doc/refman/5.7/en/date-and-time-functions.html#function_month
  20. The connection module is just THAT. It is not a query module. It is not an update module. It is simply your permanent connection module. You use it when you need to establish a connection and you keep it in play all during your script, if the script needs to communicate to the db. That is it. It is the one and only place you make a connection and that means you only have one place to maintain should there be any changes in your credentials or your database tool.
  21. So the problem was with the credentials? Did you use the SHOWMSG argument to get the true error message?
  22. Must be something in the hidden files that I can't see. I took the basics of your script and ran this: <?php session_start(); // If the user is not logged in redirect to the login page... // if submit button selected run code if(isset($_POST['submit'])) { $_SESSION['district'] = $_POST['district']; echo "You have selected ".$_POST['district']; } // output the html now ?> <!DOCTYPE html> <html> <body bgcolor=#fafafa> <br> <br> <form action="test.php" method="POST"> <label>Select District you raced at</label> <select name = "district"> <option value="" disabled selected>Choose your district</option> <option value="Z">Zwift TT - Z</option> <option value="">--------------------</option> <option value="A">Central A</option> <option value="B">East - B</option> <option value="C">Lincolnshire - C</option> <option value="D">Liverpool - D</option> <option value="E">London East - E</option> <option value="F">London North - F</option> <option value="G">London South - G</option> <option value="H">London West - H</option> <option value="J">Manchester - J</option> <option value="K">Midland - K</option> <option value="L">North - L</option> <option value="M">North East - M</option> <option value="N">South East Midlands - N</option> <option value="O">North Midlands - O</option> <option value="P">South - P</option> <option value="Q">South East - Q</option> <option value="R">South Wales - R</option> <option value="S">South West - S</option> <option value="T">Teeside - T</option> <option value="U">West - U</option> <option value="V">Yorkshire - V</option> <option value="W">Scotland - W</option> <option value="Y">National - Y</option> </select> <br><br> <input type="submit" name="submit" value="Submit"> <br> <br> </form> <?php exit(); This worked equally well on my pc and my iphone. So - look for a problem in the JQ perhaps?
  23. And as I sadi last time the connect logic is failing you. Did you follow the instructions and have the module give you the full error message???
  24. From the code you presented - yes it is that simple.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.