Jump to content

GingerRobot

Staff Alumni
  • Posts

    4,082
  • Joined

  • Last visited

Everything posted by GingerRobot

  1. You'll have to do it yourself. Is it really that hard to divide by 86400(24*60*60) to get the number of days? Use floor to round it down. Take that number of seconds off. Repeat for hours (though, obviously, divide by 3600) then minutes
  2. Eclipse is most likely your best, though you might want to figure out what's going on with gcc since it'll use that to compile anyway.
  3. Cant you just use one of the readily available programs to mount the iso as a virtual CD drive?
  4. If you want to be that specific with the time remaining, you're best bet will be to convert to a unix timestamp (you can use the UNIX_TIMESTAMP() MySQL function for this) and then do some maths. Basically, you're going to end up an integer which is the difference between the two dates in seconds. You'll then need to convert seconds into more reasonable units.
  5. Most of the time, storing an array in a database field is a bad idea. Why? Well, it makes searching, sorting, deleting and updating all the more difficult. Not only that, but it gives you scope to change the number of allowed images and is almost certainly going to be more efficient both in terms of time taken and space used. Almost every time you feel the need to do this, what you actually want to do is add another table. For example, you might add a another table called images with fields id,userid,imagepath. The field userid can then be used in a join to be able to select the relevant images for a particular user. If you're confused, this tutorial would be a good place to start.
  6. Yep - though you'd obviously want to sanitize that data. What do you mean? Are you trying to format the data when you grab it from the database? If so, then use the MySQL DATE_FORMAT() function : http://dev.mysql.com/doc/refman/5.1/en/date-and-time-functions.html#function_date-format
  7. If you're only storing dates you might as well use a DATE type rather than a DATETIME field - it'd use less space and it would make searching even easier as you can just check for equality.
  8. If magic_quotes are turned off, just use mysql_real_escape_string() - there's no need to do anything further. If magic_quotes are turned on, you'll want to stripslahes() first.
  9. You'll need to read all of the files into an array, and then use array_slice to extract the correct 5 files based on the page number.
  10. My department recommends a book called Java By Dissection. Haven't got all that far with it yet though, so i can't personally vouch for it.
  11. Storing the salt in the database is a bad idea. The entire point of salting passwords is that, even if someone did get hold of your encrypted password, it would be difficult to find the original string. How would they get hold of your password? Well, that's likely to involve some sort of unauthorized database access. Hey-ho, they found the salt too. Of course, they'd still have to brute force the password as any pre-compiled rainbow tables would be pretty useless, but it'd still be a damn sight easier.
  12. And it was also available in php 4. I'm so confused...
  13. What is the text? Is it a page on your own website? Can you just include it? Could do with a bit more information really.
  14. If you want someone to do this for you, you need to be posting over on the freelance board. No-one's going to write that for you for free, however.
  15. Do you seriously expect us to be able to diagnose your problem without seeing any of your code? Please post up the relevant parts using tags.
  16. That's a pretty vague question. What is the link they're clicking? Where does it direct to? What do you actually want to happen? Without more information, my best guess would be that you're looking for the onClick javascript event.
  17. var_dump does exactly what it says it does in the manual. You need to learn to look things like that up yourself - it's not even difficult, just type the function name after www.php.net/ (e.g. www.php.net/var_dump) and the manual really is a great resource. Also, you need to make sure you exit after that header() - you don't want the rest of the script executing.
  18. A gadget: http://www.google.co.uk/ig/directory?hl=en&type=gadgets&url=hosting.gmodules.com/ig/gadgets/file/101213325441522857124/xkcd.xml
  19. If you mean pagination, you can find a tutorial here If you're looking for someone to do this for you, head over to the freelance board.
  20. Yep In all seriousness, i feel old sometimes.
  21. When you submit a form, text inputs will always be set though they may be empty. You should use the empty function to find out if they've been left blank. And please don't make posts with the title in capitals.
  22. Yeah, i just use the gadget for iGoogle.
  23. www.urbandictionary.com ? I love that place. Means i can pretend to have a clue what kids these days are talking about.
  24. There is. See here. However, it isn't based on thanks. A karma system was experimented with in the past. Lets just say it didn't work too well.
×
×
  • 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.