Jump to content

.josh

Staff Alumni
  • Posts

    14,780
  • Joined

  • Last visited

  • Days Won

    43

Everything posted by .josh

  1. I see multiple rows with the same position number. Each row has to have its own position number (they have to be unique, but don't make the column a unique type or the swap won't work (read the tutorial for details))
  2. http://www.phpfreaks.com/tutorial/php-custom-list-order
  3. yep. if you want the button to be grayed out, you need to use js to validate the form first. But fyi, all someone has to do is disable js and poof, no form validation. If you want to do it as a first level validation for purely aesthetic purposes, go for it. But you still need to validate form info server-side, where the user can't tamper with the validation script.
  4. if you want someone to write code for you, post in the freelance section. thread closed.
  5. hey you never know what you'll find. balloons full of cocaine, random gems smuggled, spare change
  6. and btw make sure you reset it to at least 24 hours in the past, to account for timezone differences.
  7. no. regex is just a small part of php. You can be really skilled at php and not really know a whole lot about regex. Regex is pattern matching, data mining. It is a big part of things like crawler bots, search engines, page scrapers, etc... But things like that are just one aspect of the whole internet mechanics. There is more than plenty of stuff to do as a web developer that has nothing to do with regex. As mentioned, most people generally try to avoid it, go their whole career only knowing basics, if anything at all. I personally get off to it. But that's me. I like picking shit apart and finding patterns in things.
  8. lol...php isn't the simple beast you thought it was 30m ago, eh? Don't worry, understanding regex is an artform all its own. Not a whole lot of people really get into it, because it's pretty damn scary at first.
  9. Also, we have a forum dedicated to regex here. You can look at the stickies for more resources/info.
  10. there are a couple of regex engines built into the php core, yes. pcre regex engine/functions is the one I suggest you use.
  11. yes. That's what regex is for. You would use for instance, preg_match or preg_match_all. You would make a pattern/rules for what you want to look for, and have it look for stuff matching the patterns/rules you specify. It can then extract what you are looking for or simply return true or false if it finds something matching the pattern, etc.. edit: so you would for example first use file_get_contents to get the file, then use regex functions to search/retrieve stuff. It really depends on what you are searching for as to how complex the pattern needs to be, or what function would be best. There are plenty of php functions that look for exact strings within other strings, etc...
  12. well it's mostly useful for scraping webpages from other places. You would then use php to parse what you scraped (using regex or whatever).
  13. A session uses a cookie to store the session id for session vars. the vars/values are actually stored on the server. But it doesn't even need the cookie to run the session. You can pass the session id other ways, if cookies aren't allowed. That's the only thing that cookies have anything to do with sessions. $_COOKIE is not related to session variables. you delete a cookie by resetting it with an expiration date of sometime in the past.
  14. file file_get_contents two of the "easier" functions, to get you started. You can also use functions like glob and readdir to find out what all files are in a directory in the first place. You can't do stuff like that with javascript. But again, that's because server-side and client-side are two different worlds.
  15. So...sessions, being able to validate information without the user just circumventing the validation process, interacting with databases, and flatfile manipulation (to name a few) isn't cool enough for you? It's not really fair to compare php to javascript. They are 2 different languages, used in 2 different settings. If you're judging it based on how flashy you can make things, then sure, it's going to be at the bottom of your list. But that's because it's a server-side language. If you want to look at making things flashy, that's what clientside languages are for. You say that php is easy and limited, but I don't think you really understand the difference between a server environment and a client environment.
  16. better off asking that in the javascript forum...
  17. possibly dumb question, but do you have any other browser instances open? Other tabs/windows? Session won't actually end unless all tabs/windows are closed.
  18. yeah the default font for pre tag is monospace. You should be able to hook font styling to it.
  19. It depends on what data type you set your mysql column to. afaik none of them will strip out extra space internal to your data, but depending on what type you use, it may pad the end of the string with extra space to reach the length you set it to be. For example, If you set it to a column type of fixed width (like char(50)) and you have 20 char string, it will not strip out internal extra spaces, but it will pad the end of the string to make it 50 chars long. If you have a variable width column type like varchar(50), it will not pad the string. If you use a binary data type column like blob, it will store it as is (in binary format though). So to make a long story short, you don't really have to worry about what happens to your data when it's going in to sql, except you might have to trim it if you use a fixed length data type.
  20. You'd be surprised how many people in the paid-for-web-dev world use classes but don't understand the point, and it coulda just been written as regular functions. You constantly hear how there's a high demand for web developers and you scratch your head wondering how that can be true when it seems like every kid on the planet is an aspiring script-kiddie...and that's the key phrase right there: script-kiddie. A good chunk of people out there getting paid to do this stuff don't really know all the ins and outs of it. So when you hear that there's a high demand for web developers, what people are really saying is there's a high demand for good web developers.
  21. <pre> something here la la lah more something </pre> It stands for pre-formatted
  22. yeah..single quotes around a variable will not parse the variable. It will be interpreted literally. Double quotes will parse it. But FYI you don't need to have the quotes at all, since it's a variable.
  23. I know for sure the pre tag recognizes line breaks. Not 100% about nobr or the css, but I think they just stop whitespace and hyphens from being eligible for line breaks (so in other words, a \n should be recognized). Just to note: the nobr is netscape proprietary and not an official tag, though most browsers seem to support it (even IE). Also I don't think earlier versions of IE support the css attribute (I think IE7+ does. Pretty sure IE6 does not).
  24. haha we don't get paid at all. It's volunteer work. Not even the admin get paid anything. The only income we get is from donations and whatever couple pennies come in from the ads, and that goes straight to the owner (eric) and it goes towards helping keep the server up (which afaik the income nowhere near matches the cost, but I'm pretty sure eric gets to write off the rest on taxes).
  25. I can imagine not catching typos being a problem (close your eyes, type away!), but the point is that being blind does not impair your ability to use proper grammar.
×
×
  • 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.