Jump to content

LemonInflux

Members
  • Posts

    944
  • Joined

  • Last visited

    Never

Everything posted by LemonInflux

  1. Dude, it's a saturday ---------------- Now playing: Linkin Park & Jay-Z - Big Pimpin'/Papercut via FoxyTunes
  2. This can't be done in PHP, because PHP can't use animations. You could do it in flash or similar, and return the value of the dice to a PHP script though. ---------------- Now playing: Linkin Park & Jay-Z - Big Pimpin'/Papercut via FoxyTunes
  3. $num = array(); for($i=0;$i>12;$i++) { $num[] = chooseRand(); } function chooseRand() { $n = rand(0,80); if(in_array($n, $num) { chooseRand(); } else { return $n; } } ---------------- Now playing: Linkin Park & Jay-Z - Dirt Off Your Shoulder / Lying From You via FoxyTunes
  4. EDIT: nvm :] ---------------- Now playing: Linkin Park - Krwlng (Mike Shinoda ft. Aaron Lewis) via FoxyTunes
  5. Use PHPFreaks! It was the best thing I ever discovered Pick something to build Ask us what you'll need to do it. We'll give you a list of functions. Go away, read into the functions, see if you can build it If you get stuck, you know where we'll be I can happily say 99% of my PHP knowledge is from using phpFreaks (and not just for my questions!) ---------------- Now playing: Linkin Park - Krwlng (Mike Shinoda ft. Aaron Lewis) via FoxyTunes
  6. If your string ends in a comma, then you'll have a blank entry on the end. use print_r to study the array. I have a feeling the last entry might be blank. In which case, just unset() the last value ---------------- Now playing: Linkin Park - 1stp Klosr (The Humble Brothers ft. Jonathan Davis) via FoxyTunes
  7. I've found the best way of learning is to make something. I started out by building a forum. I finished the forum, then discovered the gallery2 project and learned a bit more about OOP. I then went back to my forum, and converted it to OOP. I looked at Joomla! and their coding technique. I went back to my forum and converted it to this way. After a while, I found a healthy medium, and formed my own sort of coding guidelines. Once you know how you code, and how, theoretically, to code everything you can think of (And whether it's possible or not), then you're good to go for jobs! ---------------- Now playing: Linkin Park - 1stp Klosr (The Humble Brothers ft. Jonathan Davis) via FoxyTunes
  8. No I mean, that should be the error. If you put it before, then you're counting on the wrong side. You should be counting after the loop. Does that not solve it? ---------------- Now playing: Linkin Park - 1stp Klosr (The Humble Brothers ft. Jonathan Davis) via FoxyTunes
  9. May I point you to http://www.addedbytes.com/cheat-sheets/regular-expressions-cheat-sheet/ ? It's an invaluable resource for me ---------------- Now playing: Linkin Park - By_Myslf (Josh Abraham & Mike Shinoda) via FoxyTunes
  10. ...for($i=0; $i<$size; $i++) The ++ comes after, not before. ---------------- Now playing: Linkin Park - By_Myslf (Josh Abraham & Mike Shinoda) via FoxyTunes
  11. ---------------- Now playing: Linkin Park - Rnw@Y (Backyard Bangers ft. Phoenix Orion) via FoxyTunes
  12. Have a get value of 10, 20, 30 etc. etc. SELECT * FROM `table` WHERE `var` = `val` LIMIT { YOUR_GET_VALUE }, 10 That'll display 10 rows per page (well, with a bit of altering) Hope that gets you started ---------------- Now playing: Linkin Park - Ppr:Kut (Cheapshot & Jubacca ft. Rasco & Planet Asia) via FoxyTunes
  13. Yes. Which is why you create an array of allowed file types, and only allow upload of files with an allowed extension. You can't mask a php file as an image *offline* though, so all you have to worry about are files called .php ---------------- Now playing: Linkin Park - Ppr:Kut (Cheapshot & Jubacca ft. Rasco & Planet Asia) via FoxyTunes
  14. From what I understand, I think it would be better not to use AJAX. Have all of the form already on the page, and just use javascript to flip it over. That way, you can, as well as making your javascript unobtrusive, hold all the data on the page without having to use cookies and other things that could be blocked by the user's browser ---------------- Now playing: Linkin Park - Wth>You (Chairman Hahn ft. Aceyalone) via FoxyTunes
  15. Hello. I've been slowly migrating to PHP5, and I've been looking at the __autoload() function. I've been wondering about this, done a little searching, and have yet to find a definite solution. My question is, can you redefine __autoload()? Say I have a class called core. In core, I want this: function __autoload($class) { include_once dirname(__FILE__) ."/$class.class.php"; } Now, in another class, called view, I want this: function __autoload($class) { include_once dirname(__FILE__) ."/views/$class.class.php"; } Is this possible? Before you ask, no I can't check it, because I have no way of testing it today Thanks in advance ---------------- Now playing: Linkin Park - Plc.4 Mie Haed (Amp Live ft. Zion) via FoxyTunes
  16. This is just regex. Go to the appropriate url, and use regex to pull the data.
  17. You would need regex most probably. Google it
  18. You could get yourself into a very bad situation if you try this. If you lose a credit card number, you're in it deep. I think, for your own safety, gateways are better.
  19. NOTEPAD++ ftw :] Oh, and make sure there isn't a cheeky little space before the <?php ---------------- Now playing: Linkin Park - The Little Things Give You Away (Live At Milton Keynes) via FoxyTunes
  20. Or if you've included the file from another, make sure you haven't already outputted anything ---------------- Now playing: Linkin Park - Numb (Live At Milton Keynes) via FoxyTunes
  21. Oh no, not a WYSIWYG editor! Click on it, then go to code view. The code should be highlighted. Look for the text in there ---------------- Now playing: Linkin Park - Leave Out All The Rest (Live At Milton Keynes) via FoxyTunes
  22. It's a help forum. You're not paying us, we have nothing telling us to help you. Manners and courtesy are a huge motivation, for the reference. Why should we write your code for you? We've told you where to look, and there's nothing stopping you looking there. We're not here to work for you, we're here to help you. Like you said, we help people 'stuck with something'. We offered you a rope, and you didn't grab it.
  23. So it's not strictly necessary? Cool beans. Topic solved?
  24. Javascript validation is a huge security risk, because it doesn't mean anything. You can use javascript injection to get past it, or even firefox's firebug addon :/
  25. Because you can get this on google. It's just like a dynamic dropdown. If it's not exactly what you want/need, adapt a dropdown code. If you can get to where you are now, you can easily adapt an AJAX code.
×
×
  • 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.