Jump to content

Adam

Moderators
  • Posts

    5,717
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by Adam

  1. Does any of your code depend upon sessions, or cookies?
  2. You need to implement a check similar to: $valid_mimes = array( 'image/png', 'image/gif', 'image/jpeg', // etc.. ); if (!in_array($_FILES['photo']['type'], $valid_mimes)) { // handle error here }
  3. What's the format you're using there? Little unusual (and logically flawed) to have the date before the month. Anyway best solution looks like: http://stackoverflow.com/questions/3075577/convert-mysql-datetime-stamp-into-javascripts-date-format You'll need to swap the parameters round for your month and date though.
  4. Can you show the layout of your form and how you're calling Facebox?
  5. I'd go with a different AJAX handler though, no offence iainwood.
  6. Ha, well said.
  7. Forgive for asking the obvious, but you can't you just manually add these? You may also run into problems with write permissions; it's not likely PHP will have access by default.
  8. Given the situation why not spend your time on integrating the user tables, as opposed to a work-around for the problem?
  9. Should be: $duration = $_POST["duration['".$row['Name']."']"];
  10. Ha! What..? As it happens last week I took my 14inch girthy beast and noshed 32 bitches, in a day!
  11. Do you have an example of the data and desired XML output?
  12. You mean an English speaking country? I'm from England and speak English pretty well.
  13. The browser automatically passes every input whether or not it's empty. Trying to use JavaScript to create a work-around is a bad idea, as not everybody has JS enabled. That and it's much more hassle than it's worth, why not just check if the user entered anything with the PHP empty function?
  14. Yeah, termidave's right. On msdn there's a list of tags that it applies to: http://msdn.microsoft.com/en-us/library/ms536439%28VS.85%29.aspx
  15. Try checking the HTTP headers with the FF add-on Live HTTP Headers. That may give a clue as to why it's not working..
  16. Yeah that's perfectly fine, it won't make any difference with speed. All it is a path so that the browser knows where to go. I'm not sure what mraza's suggesting with using the server's document root, but $_SERVER['DOCUMENT_ROOT'] (which ever way it's accessed) is the server's file system path to the document root, not the browser's / publically accessible path.
  17. What's the problem with it?
  18. In answer to your first question, just send the smiley as the second parameter to formatText(). I don't have time to look into your IE problem at minute though, I'm just about to leave. I'll take a look later on.
  19. If you don't specify a path for the links, they'll default to the same directory. You need to specify either the relative path from the current directory: href="../entry.php" Relative from the document root: href="/myPage/entry.php" Or an absolute URL: href="http://localhost/myPage/entry.php"
  20. Basically you have to capture the scrollTop value of the text area before you change the value, then reapply once it's been changed. You'll also need to set the new selection after, otherwise the cursor won't be in the right position: function formatText(el, tagstart, tagend) { if (el.setSelectionRange) { var start = el.value.substring(0, el.selectionStart); var selected = el.value.substring(el.selectionStart, el.selectionEnd); var end = el.value.substring(el.selectionEnd, el.value.length); var scroll = el.scrollTop; var caret = el.selectionStart; el.value = start + tagstart + selected + tagend + end; el.focus(); el.scrollTop = scroll; if (selected.length == 0) { el.setSelectionRange(caret + tagstart.length, caret + tagstart.length); } else { el.setSelectionRange(caret, caret + tagstart.length + selected.length + tagend.length); } } else if (el.createTextRange) { // IE code here... } } That'll cater for when you pass a start and end tag for highlighted text too. I'll let you have a bash at the IE compatibility part though, look into createTextRange
  21. Could you not just set-up the 'https' dir as a symlink to 'http'?
  22. Create a plain text file with your cron job in. For example: 0 0 * * 1 command to be executed You'll then need to use the crontab program to install the cronjob: crontab /path/to/cronjob/file You can then check the cronjob was installed successfully with: crontab -l
  23. Can't really help you based on just that. Are you using a plug-in, and if so which? It doesn't look like 'jQuery Autocomplete' as the properties are different.
  24. Try 'onkeyup'.
  25. Oh yeah, now I've reread it can see what you mean. Have to see what the OP says..
×
×
  • 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.