Jump to content

jayR

Members
  • Posts

    26
  • Joined

  • Last visited

    Never

Everything posted by jayR

  1. I agree with thorpe.  This isn't really a good place for this, and I about fell out of my chair having seizures when I tried to read through it.  :)  I'd submit it and see if they'd put it in their articles or tutorials section instead.
  2. sorry to bump, but I could really use help on this
  3. Hello.  I'm generating some stats in my php script and I am also generating an excel file at the same time so that it can be downloaded and worked with.  The problem is that for some reason the Excel file won't update when the stats do, like its cached or something.  The file on the server is updated but thats it.  I know that you need headers to tell it not to cache, but I don't know where to put the headers.  The page the link is on currently has these headers: header("Expires: Mon, 26 Jul 1997 05:00:00 GMT" ); header("Last-Modified: " . gmdate( "D, d M Y H:i:s" ) . "GMT" ); header("Cache-Control: no-cache, must-revalidate" ); header("Pragma: no-cache" ); header("Content-Type: text/html; charset=utf-8"); and has other information that shouldn't be cached on it and it is working fine.  I also found a post that says to use these headers: header("Content-type: application/vnd.ms-excel"); header("Content-disposition: attachment; filename=$csvnameext­"); header("Expires: Mon, 3 Jan 2000 05:00:00 GMT"); header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); header("Cache-Control: no-store, no-cache, must-revalidate"); header("Cache-Control: post-check=0, pre-check=0", false); header("Pragma: no-cache"); These, however, make links pointing to this page treat it like an excel document, not a web page that simply has a link to an excel document.  If theres anything else you need to help solve this let me know.  Thanks.
  4. I guess the thing I don't understand is that I have inputted illegal strings into the database through my PHP (i.e. "Jay's Input") and it is automatcally escaped when I check its value in the database.  I'm more wondering why it is doing it for me without me telling it to, not how I would do it manually.
  5. When I was taking my class in PHP 4, we were always taught to escape all user input before using it in our queries like good little coders.  However, after upgrading to PHP 5 I noticed that it looks like PHP will automatically escape the user's input for you, so I guess my question is, do we still need to escape everything that we get from users, or can we trust PHP to do that for us now?
  6. jayR

    Database Question

    Mostly information on people, ip addresses, phone numbers, descriptions, department info.  All text or ints
  7. Hi, I'm currently setting up a database for my company's intranet page and I began wondering about how large the hard drive should be.  After looking around for a while I was unable to find the amount of space my database was taking up on the server's hard drive.  Is there a way to see how much space my current database is taking up?  And how much space do database's take up?  Is a gig enough space for a database that could have over 1,000,000 records, or should I plan on more? 
  8. Ok, so I have an AJAX application that I'm working on that needs to have an "alert sound" played when the current information changes so that the user notices it.  I'm not exactly sure what I should go with here, so I'm looking for suggestions from people that have done similar things in the past.  Any input/advice would be greatly appreciated.  Thanks.
  9. Thanks Drumminxx, that did it.  And I couldn't just clear the cache each time because I didn't want to users to have to do that when they were viewing the reports.  That would sure get annoying fast for them.
  10. I'm working with a report that is generated from our database.  It seems to be working fine, except once in a while IE will cache the results and you'll have to refresh the page multiple times or sometimes even close the browser and reopen it in order for the newest results to be displayed.  I have header("Cache-control: private"); on the top of each of my pages, so I'm not sure what else I can do.  Any help would be appreciated.  Thanks
  11. Thanks, I just wanted to make sure.
  12. Hello, I've been programming in php for a year or two now at school, but I've never actually set up my own web server. This summer, I'm doing an internship and the company I am working for doesn't know much about web programming and stuff, but they really want me to build a web system for them. Remembering WAMP, I set it up on a computer and its been rolling great for about a month now. Thing is, I read today that "WAMP isn't meant as a production server." What does that mean? Should I not use it for this company, which will have maybe 100 people accessing it a day or are those numbers low enough it should be fine? It just scared me a little bit and I want to make sure I won't be hanging them out to dry when I leave. I read something about "VertigoServ" also.  Would that be a better way to go if Wamp is not safe/stable enough?  Thanks.
  13. I really like Programmers Notepad  :D
  14. Ok, so this summer I'm working as an intern and developing a PHP system for the company.  No one here really knows anything about PHP/MySQL/any web stuff pretty much.  I just set up a simple server, running WAMP5, and everything is running fine off of this.  The problem is that I leave here in a little over a month, and they would like backup capabilities for their database, obviously.  I would really like to write a php program that allows them to simply click a "Backup" button and an sql file would be generated with all the contents of the database.  I know that MySQL allows people to export their databases, but is there a way to call this export from PHP?  or will I need to write php that generates the sql export?
  15. I'm using number_format right now, and thats my whole problem.  I have a variable number of decimal places and number_format requires you to enter the number of decimal places for the number and I was just wondering if there was a function that doesn't require that but still will put the commas in.
  16. Round doesn't add in the commas though in its output, which is why I needed to format the numbers to begin with.  Thanks for your speedy reply though.
  17. I'm currently running a page that reads in a file created by our mainframe with various stats for the week.  Some of these are averages that have up to 4 decimal places, while others have no decimal places at all.  I am looking at the number_format() function, but it looks like you have to tell it how many decimal places to place in the number, and I need to format the mainframe's numbers because it doesn't add commas to the thousand's place (i.e. 1,000 = 1000).  Is there a function that will simply check the number of decimal places then display them all?  Or would I have to write something custom for this problem?  Thanks.
  18. jayR

    Php Pdf's

    I have WAMP 5 installed on my Win2000 machine and I'm trying to create pdf's from my php code. I've read about the pdflib, but from what I've seen you have to pay for it so I don't really want to go that route. I have noticed, however, an extention in Wamp called "php_pdf". Is this about the same? I haven't found much documentation on it so instead of wasting hours on Google I thought I'd just ask here and see if it can do what I need. I really just need to create simple PDF files that users can print once they are generated. Thanks in advance.
  19. You could just put another field in your database (I'm assuming you're using a database) that is "uploaded" or something like that. Have it default to 0 and change it to 1 once they upload their avatar stuff, then you can point to where their avatar is stored...thats what I would do if I correctly understood your question.
  20. Hi all, I'm working on, what I thought would be, an easy problem. Its simply an if statement that checks if a value is greater than 1000. However, its not picking anything up and I'm running out of time for this project. My problem code is as follows... //$AmtOfAdj is set from our database, and I've printed out its values so I know its getting the right values $AmtOfAdj = number_format($commaFile[$i] * .01, 2); settype($AmtOfAdj, "float"); if($AmtOfAdj > 1000.00) { print $AmtOfAdj . "<br />"; } I have no idea why its doing this, but I'm stuck so if anyone could help me out I'd appreciate it. Thanks a lot
  21. Nevermind, I misread what the functions did. I forgot to actually draw the text I wanted to print. [img src=\"style_emoticons/[#EMO_DIR#]/smile.gif\" style=\"vertical-align:middle\" emoid=\":smile:\" border=\"0\" alt=\"smile.gif\" /]
  22. I found a tutorial on this, and used some of there code which is: <?php $handle = printer_open("HP LaserJet 4200 PS"); printer_start_doc($handle, "My Document"); printer_start_page($handle); printer_end_page($handle); printer_end_doc($handle); printer_close($handle); ?> Unfortunatly, the printer will only print a blank page everytime instead of the string "My Document" which I want to print. Has anyone ever messed with this php_printer.dll and had similar problems? I seem to be stuck and I can't find much more on it.
  23. The thing is that multiple people can share computers, so they have the same IP address. If I could log their Novell username it would let us see who specifically accessed the page, not just which machine.
  24. There is a variable I can access from the dos promt that is called %nwusername% and it returns the novell username of the person currently logged into the system. Is there a way I can access that variable so that I can record the username of who is accessing my company's intranet page? I've looked around but found nothing. Thanks in advance.
  25. I'm currently working on an Intranet site for my company, and my boss wants to be able to ensure that certain employees go to sections that they are required to view, such as updated handbook pages, schedules, or whatever. We use a Novell network, and I was wondering if there was a way to get the user's Novell username from php? I can get the computer name, but the same computer is sometimes used by multiple users so that doesn't give me everything I need. I've googled this and haven't found anything, so I'm hoping the collective wisdom of this forum will be able to help me out. Thanks.
×
×
  • 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.