Jump to content
Larry Ullman's Book Forums

jonpugh114

Members
  • Posts

    12
  • Joined

  • Last visited

jonpugh114's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. Thanks for that, it looks like I might have to show the pages using images, which will make my life easier. Cheers, Jon
  2. Hello, Does anyone know whether it's possible to open a PDF file within a web page using PHP (or even JavaScript)? I need to make a magazine viewer without using Flash (thanks to the iphone/ipad), so I was hoping that the original PDF could be accessed directly. Thanks, Jon
  3. Hello, I've been recently getting into OOP, and trying to put some classes together to speed up development. My next target is to simplify working with a database, especially when it comes to pagination. Has anyone got any suggestions of an approach I could use to simplify the whole process with compromising flexibility? Thanks, Jon
  4. Hello, I'm trying to get into OOP and I'm putting together a class to create and validate form inputs/selects/textarea etc. The property I want to create is an array to hold errors. When a validation method fails to validate the posted input it will add an element to the array which is picked up by the method to create the input then add a class and an error message. What I'm stuck on is how to create a property as an array, and how to add elements to that array from within the class. Can anyone point me in the right direction? Maybe I should have started with "hello world"... Cheers, Jon
  5. Actually I've sorted it, I was calling the file in from another directory, I'm not entirely sure what the problem was but I resolved by placing the download script in the same directory as the PDF's. Thanks, Jon
  6. I've still got the same problem, the pdf downloads but it's either empty or corrupt. Any thoughts?
  7. Hello, I need to force download a PDF file instead of displaying it in the browser, any idea how I'd do this? This is what I've tried: $file = 'file.pdf'; header('Content-type: application/pdf'); header ("Content-type: octet/stream"); header ("Content-disposition: attachment; filename=".$file.";"); header("Content-Length: ".filesize($file)); readfile($file); exit; This appears to force the download, but when I try to open it I'm told that it's either empty or can't be read. Any ideas? Thanks, Jon
  8. The query seems to work, I've tested it and it has returned results as expected. Regarding the database design, the search is for the whole site, and users would be looking for page content along side category/product information. I'm sure that I could (or maybe should) have designed the database so that all content occupies it's own table and I'll bear that in mind next time it comes up. Thanks, Jon
  9. Actually, I think I've got it... This is what I'm doing, and it seems to work: I'm just returning id's at the moment, but obviously I'll be creating more meaningful results. Cheers, Jon
  10. Hello, I need to set up fulltext searching using three tables, I can do it fairly easily with one table but I'm struggling with this problem. I was thinking that if it can't be done using a single query, maybe I could do separate queries for each table and try to return a numerical relevance score, which would allow me to merge the results. Can anyone point me in the right direction? Thanks, Jon
  11. Hello, I'm just using TinyMCE for the first time and I'm really impressed - except that I can't enable the image upload without parting with some cash for every site I use it on. Can anyone recommend any third party plugins, or make suggestions on how I could set something up myself? Cheers, Jon
  12. Hello, I'm building a site for a villa where they will be taking online bookings, it's mostly straightforward but I'm trying to find the best way to calculate a different price for different seasons (calculated by the day), bearing in mind that one booking could straddle two seasons. Any ideas? Cheers, Jon
×
×
  • Create New...