Jump to content

.josh

Staff Alumni
  • Posts

    14,780
  • Joined

  • Last visited

  • Days Won

    43

Everything posted by .josh

  1. Yeah I've never really found a free one out there that actually does anything more than scan, tell you the problem, and prompt you to buy the full version if you want it to actually do anything about it. You would think something like that would be built-in to the OS...
  2. they all have their ups and downs. Model: I hate the ... well I pretty much hate all of the model. But I do like swimming around in a sea of data, finding patterns, etc... View: I hate the part of view where you have to make your shit compatible with essentially 5,000 browsers to appease the greatest % of the population. But in some ways it is the easiest, as it is the most visual, and there's not a whole lot of logic involved, except for inheritance, I guess. (I don't really put javascript in this category; rather, the Control category). Control: I hate having to fuck around with making control shit secure. But I do like figuring out how to code stuff, in general. I get warm and fuzzy feelings just thinking about regex.
  3. considering nobody seems to ever be able to find the topic solved button, I'd assume it was on purpose.
  4. yeah...I looked at it, and looked at, and looked at it...and looked at it...and decided fuck it, who cares. I don't really see how that function would really be useful for anything. Not gonna jump the gun and say it isn't...I mean, I don't know the context for which it's in...but at the very least, it's very bloated...
  5. $var = "variable"; $$var = "some text"; echo $variable;
  6. hmm i think you might want to look into mysql's distinct()
  7. No. http is a stateless protocol. What that means is once a script is run, as far as the server is concerned, you no longer exist. So when you submit a form, anything generated from the previous script execution doesn't exist. Now, you can use things like cookies and session variables and flatfiles and databases to store information and retrieve it from one page to another, but you aren't doing any of that. Nor do you really need to, in this instance. You just need to reorder the flow of your script. Your script order should be as such (pseudo code): if (isset($_POST)) { // if there is something in the post array, that means a form was submitted // validate info, process submitted data, generate error variable(s) if things don't check out if ($errors == 0) { // after all that stuff above, if no errors were generated... // do header stuff here } } // if the script makes it this far, that means either form was not post or else there were errors and there was no header redirect. // echo out error messages if any // echo out form edit: I simplified it a bit
  8. I see you setting a cookie with $hash as a value but I don't see where you are assigning anything to $hash. I also see lots of setcookies but nowhere where you actually retrieve it. Is that in hashPassword() or an include?
  9. so you need to reorder your code. Do all the condition code that generates the error messages, then do the condition that checks if error messages exist.
  10. maybe you have multiple rows with the same data? You are pulling stuff from a lot of diff tables...same column/value criteria match up for more than 1 table?
  11. I'm so awesome I solve problems without even posting.
  12. no...script is parsed top to bottom, left to right. You have to assign something to it before you can use it. The only sort of exception is calling a function or class before defining it. Example: doSomething(); function doSomething() { echo "something"; }
  13. okay then you are going to have to go back to using AND instead of OR but only querying for the ones selected (what lynxus said) for example: $sql="select farm_name, farm_address, farm_city, farm_state, farm_zip, farm_description from farm_farm, farm_type, farm_product, farm_farmproduct where farm_product.product_id=farm_farmproduct.product_id and farm_farm.farm_id=farm_farmproduct.farm_id and farm_farm.type_id=farm_type.type_id"; $sql .= (trim($_POST['city']) != "")? " and (farm_city like \"$_POST[city]\")" : ""; $sql .= (trim($_POST['state']) != "")? " and (farm_state like \"$_POST[state]\")" : ""; $sql .= (trim($_POST['farmtype']) != "")? " and (farm_farm.type_id like \"$_POST[farmtype]\")" : ""; $sql .= (trim($_POST['product']) != "")? " and (farm_product.product_name like \"$_POST[product]\")" : "";
  14. $sql="select farm_name, farm_address, farm_city, farm_state, farm_zip, farm_description from farm_farm, farm_type, farm_product, farm_farmproduct where farm_product.product_id=farm_farmproduct.product_id and farm_farm.farm_id=farm_farmproduct.farm_id and farm_farm.type_id=farm_type.type_id and ((farm_city like \"$_POST[city]\") or (farm_state like \"$_POST[state]\") or (farm_farm.type_id like \"$_POST[farmtype]\") or (farm_product.product_name like \"$_POST[product]\"))" ;
  15. not all of them...only the ones in-between your like statements.
  16. ... (column like 'somethin') OR (column like 'something') OR etc...
  17. how are we supposed to tell you what it does when you remove all the code and put // ... in there? Or if that's really what's in there, then it does nothing.
  18. okay that's because you are not using | as a delimiter. You are using ' | ' as a delimiter. And you did not wrap the implode in parenthesis. $Scotland = array("AB","DD","DG","EH","FK","G","TD","KA","KW","KY","ML","PA","PH","IV"); $place_arry = "(" . implode("|", $Scotland) . ")"; $where_clause = " WHERE Usr_Pcode REGEXP '^".$place_arry."[0-9]+' = 1";
  19. okay so instead of making 500 threads that all seem to be related, how about explaining your overall goal here...
  20. It has also been my experience that if you turn around and google, using exact urls as search term, it seems to speed things up. I don't know if it is officially part of some formula or process or whatever; I've just noticed googling a couple pages here and there on domains that I know to have no kind of previous indexing... google url and within next day or two it's showing up in search results...
  21. In that case I'd store as a delimited string, or else have a separate column for each part of the date.
  22. Also be aware that Flash is an expensive program. Latest version costs like $700. Even if you are eligible for a student discount (registered college student for example) it is still going to set you back a couple hundred bucks. So it is an investment. You can download a trial version for 30 days though. Having said that, I would first focus on using the non-actionscript part of flash, first. Learn the basic drawing tools, how the stage/layers/frames/scenes are all setup/work. Learn about creating an object through the flash interface, creating animations etc... why? Because actionscript revolves around all of these things.
  23. If it helps, it was with great sadness and a heavy heart that I posted that, as range is one of my better liked functions.
×
×
  • 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.