Jump to content

Adam

Moderators
  • Posts

    5,717
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by Adam

  1. Put this just before your query call: $asc = (isset($_GET['orderbyASC'])) ? 'ASC' : 'DESC'; Edit: Whoops, corrected a mistake!
  2. There's a few methods of doing this (search the forums for past topics for more information on them). With your setup what I'd do personally rather than having separate HTML files for each language, which obviously means editing 2 files whenever you change the structure of the page, I'd implement a SMARTY style tag that you can encase around any text to be translated. So you'd have a kind of master file in English, then depending upon a param passed in the URL (e.g. "lang=nl" you can look up the translation in the specified language. So say {t}hello{/t} would translate into "Hallo" (I think, I don't know Dutch).
  3. print date("Y-m-d G:i:s", strtotime($row['date_expires'] . "+2 minutes"));
  4. Your web host should allow you to stores files outside of the web root. When you login through an FTP client, do you have to drill through to "htdocs" or "public_html" (or something similar)?
  5. Use a script to retrieve the file, but store the original in a directory not accessible from a browser (i.e. outside of the public_html / htdocs dir).
  6. I'm being redirected to some kind of long-winded 404 error.
  7. I have to agree - use a different skin, improve the quality of the logo.
  8. Well the manual actually recommends: while (false !== ($file = readdir($handle))) { Personally I'd just go with that.
  9. If you decide to still go ahead with original idea, there is a way you can do it by generating a new key. Found this: https://lists.ubuntu.com/archives/ubuntu-users/2006-June/082869.html
  10. How about system() or exec()?
  11. You could also look into Aspell. As patrickmvi said though they take some configuration, which isn't always possible with some shared hosting plans.
  12. Well the code generating the error is: if(!$servervalidation->checkEmail($_POST['email'])) { echo "<h1>Error1</h1>"; echo $servervalidation->checkEmail->$response; } Obviously it's calling the 'checkEmail' method, which must be returning false. Try changing it to: public function checkEmail($email) { $formatTest = '/^[-\w+]+(\.[-\w+]+)*@[-a-z\d]{2,}(\.[-a-z\d]{2,})*\.[a-z]{2,6}$/i'; $lengthTest = '/^(.{1,64})@(.{4,255})$/'; if (preg_match($formatTest, $email) && preg_match($lengthTest, $email)) { return true; } else { return false; } } I've not validated the regex used by the way, there could possibly be an error there.
  13. Paste your full code. I can only assume at some point you've made a typo or accidentally changed a var.
  14. Where does $entities_array come from?
  15. I think it does, but I don't think $dir is a valid listing: http://googleblog.blogspot.com/2006
  16. Have you tried using mysql_error() to see if there's an error returned from the query? I'm assuming you've switched the table and field names to post on here? Do you get any PHP errors? Are they disabled?
  17. Adam

    Countdown

    The best method is not to store how much time is left, but when time's up. That way you keep it a constant value in the database and can just calculate how much time is left.
  18. What for ?? Frames should never be used where ever humanly possible these days. Rubbish for browser support, search engines, etc. Not good advice that mate if i'm honest!
  19. Yeah I agree. I've read somwhere too that bold tags if you use them right Google will use them to index the site better - but that could be completely wrong. But yeah looks better without the images stretched and odd looking. Think the adds are a bit much, as far as adverts go, a laptop sale or something looks better than Google's plain text style that's odd to the rest of the site; the ones on the left. In my opinion...
  20. They're using a frame, I don't quite know how they're doing it looking at the source, but it's a frame.
  21. Surely if it's in a pop-up that won't be affected by links being clicked in another window? Or do you mean a JavaScript custom kind of pop-up?
  22. Add a question mark after the plus operator to make it not-greedy! (.+) Would become: (.+?)
×
×
  • 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.