Jump to content

cpd

Members
  • Posts

    883
  • Joined

  • Last visited

  • Days Won

    5

Everything posted by cpd

  1. I see no specific problem and I see no offer of payment for work so what exactly are you looking for because you're sure-as-hell not gonna get someone to write the code for you...
  2. Hello, welcome to the forums. You can pull this off in a single query UPDATE `cars` SET `car_color` = ( SELECT `fav_color` FROM `friends` WHERE `id` = :rowIdInFriends ) WHERE `id` = :rowIdToUpdateInCars Or if you have a common field, you said name, you can do UPDATE `cars` SET `cars`.`car_color` = `friends`.`fav_color` JOIN `friends` ON `friends`.`name` = `cars`.`name` WHERE `name` = :someName The second would update every row with the fav colour. Not sure if that's what you want or not. Be careful though as the second relies on a Many to One relationship from Cars to Friends respectively. I can't visualise the outcome of the opposite relationship at this tired hour but I think it'd be rather unwanted.
  3. Have you tried closing and restarting WAMP altogether to be absolutely sure?
  4. As far as I can tell there isn't a specific issue jazzman1. The OP just asks for methods to limit the size of the directory contents. I never mentioned limiting the file system with PHP, merely a method of tracking the total file space currently taken up by said user. There may be additional methods to ensure it directories don't exceed a specific amount and you could implement it as a precaution should it exist.
  5. You don't need 2 tables, a pro forma and an invoice can be put in 1 table - called invoice - with a column called "pro_forma" of type boolean indicating if its pro forma or not.
  6. That's not how you should be using mod_rewrite. You can't define every link and every possible bit of GET data, that's just crazy. Go an have a read on what it should be used for and then how to use it.
  7. Record in a database what they've uploaded and have a check in whatever carries out the upload?
  8. I doubt you'll get a "snippet" as it now sounds like you want someone to do it for you and people don't take kindly to that. Perhaps if you follow Barand's link and try to understand the content attempt something yourself, people will be more inclined to assist you.
  9. Create a Javascript file and include it in the header. The file should contain the logic for adjusting the character counter - possibly register a "keyUp" event listener as well.
  10. Click WAMP -> Apache -> Apache Modules and see if mod_rewrite is enabled. Edit: it should be called rewrite_module.
  11. Are you running this on WAMP or something? It sounds like mod_rewrite isn't enabled.
  12. You have special characters in most if not all computer languages that represent something. In this case a dot/period/. - in the second condition - matches the requested file name, followed by some character, followed by "php". E.g. "myfilexphp", "myfile4php", "myfile:php" are all valid but technically incorrect. To ensure it matches a dot only you must escape the special character; this applies to every special character. This can be done by using a backslash although it may be another character in some languages (I'm yet to see one where its not a backslash). So your condition should read: RewriteCond %{REQUEST_FILENAME}\.php -f
  13. Well you need to escape the dot in your second condition.
  14. That's what the Americans say . The English use square brackets, brackets, curly brackets just to confuse things.
  15. You can't "link" to a function, that's not how the web works. Your link directs the client to a script that carries out the directory removal and then perhaps outputs content... Or does something else, that part is up to you.
  16. cpd

    run loops

    I'm not entirely sure what you want as you've asked a few different questions. I think you should explain clearly what your goal is in the simplest way possible. Your current explanation isn't very coherent which may explain the lack of responses.
  17. Whitespace wont affect your code, it just makes it legible. Your code is still somewhat illegible as you've not followed any pretty standard conventions such as dropping a line when opening a curly brace. With regards to the code, you should use a foreach loop to cycle through the array not a for loop. You don't really need a form and button to remove a directory, you can just have a link that links to a directory deletion script with a directory name as GET data or something. That said, we can't see your code that removes the directory so how on earth you expect us to assist in debugging your code I really don't know...
  18. I'm using a 1920x1080 resolution on a 22` monitor.
  19. Have you tried dumping the $_FILES variable to see if it contains anything?
  20. Having reviewed your original post (which I would have read properly had you used code tags) I've realised your database design is not good at all. Your table for categories should be completely separate from the products table with a field indicating its parent category if any. If its a main category you can set the "parentCategoryID" equal to NULL. I strongly recommend you redo your database else you'll have bad code throughout your application which is what your previous post has.
  21. http://i49.tinypic.com/kedvrt.png Note the navigation and the vertical scroll bar.
  22. I severely dislike the page not extending to at least my screen height when the content fills up the pre-defined area.
  23. Because we're not that smart
  24. // Create an array to house the postcodes $postcodes = array(); // Open the file and cycle through stripping any \n characters from each postcode. $f = fopen("file.txt", "r"); while(!feof($f)) $postcodes[] = trim(fgets($f)); fclose($f); // Is SE5 in the array? if(in_array("SE5", $postcodes)) echo "Found you"; I didn't like your logic so re-wrote it. There's no reason why that shouldn't work. Edit: Sorry scootstah, didn't see your post.
×
×
  • 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.