Search results

  1. M

    Mysql+join+count

    To add to what garrettroyce said: as you're joining on uptime_ratings.freehost_id, the expression COUNT(DISTINCT uptime_ratings.freehost_id) will always be 1. There should be another field/other fields you can use in a COUNT(DISTINCT ...) that should work, the same field(s) you can use to...
  2. M

    Mysql+join+count

    What are the structures of the tables? I suspect you need a more restrictive join. Edit: I believe the DISTINCT option for SELECT operates on the final result set, after COUNT() has merged grouped rows, which is why it didn't help. Also, freehost_id is probably only part of the join domain...
  3. M

    Javascript scrolling

    Now that you know how, are you sure you want to use a marquee?
  4. M

    Ajax link checker

    I mean does the HTTP response status line have a 404 status code or not (I checked; it does). In that case, the a custom error page is not causing problems for script, which doesn't even fetch the page itself. When describing a problem, stick to the symptoms and don't guess at what you think...
  5. M

    php form

    You can also use filter_var_array to validate and sanitize user input. A loop (such as a for or foreach loop) will help cut down on repeated code (all the "if" branches). The return value of mail() might be helpful. If mail() returns false, the message was never accepted for delivery. Be...
  6. M

    php Date()

    Alternative timestamp conversions: strtotime will parse a string into a Unix timestamp; it's less efficient than other approaches (such as yours), but not overly so and is very succinct. strptime and date_parse_from_format will efficiently parse a date/time string to an array. You can even use...
  7. M

    Ajax link checker

    If properly configured, custom error pages shouldn't affect the script, for it never retrieves the page itself, only the HTTP headers. Given the limited information you provided, there's no way of knowing what's going wrong. How did you set up custom error pages? How are they breaking the...
  8. M

    Loading checkbox[] values

    Client side validation/sanitizing doesn't count, and neither does server side if it was on a previous page & was resubmitted. You should filter either every time you grab something from $_POST/$_GET/$_REQUEST or whenever you hand the data off to a subsystem, such as MySQL.
  9. M

    Need help loading a page before displaying it

    Now I see what's happening. You're using animated transitions which, sadly, CSS can't support. The images start playing as soon as they're downloaded and there's no way of controlling the animation. You can stick with the old Dreamweaver MM_* functions for now. They work, despite being...
  10. M

    Need help loading a page before displaying it

    The sample you posted works for me with images in place. Post a link to the above as a live page so I can see it with the images you're using.
  11. M

    Ajax confused

    false != "false". I think you mean something like '' == false and '' !== false. Also, 10 == "010" && 0 == '' && null == '' but 10 !== "010" && 0 !== '' && null !== ''.
  12. M

    help

    Your subject line is terrible. You'll probably get more help in the future if you write better ones. Yay! You've given your included scripts more descriptive names. You still need to do the same for your variables. You're also still not filtering the user input. Any time you find...
  13. M

    Loading checkbox[] values

    Filtering means removing/cleaning up invalid data from input, usually with the filter functions. It's related to validation and very important in preventing SQL injection. Actually, your script loops over an index. If you use a foreach loop, you can loop over the array elements...
  14. M

    Date and Time Script

    Use setInterval to repeatedly run a function. document.write is horribly outdated and won't let you update elements. Put each field in its own element (probably a <span>). Use document.getElementById to get a reference to each element in the script. Assign to element.firstChild.nodeValue to...
  15. M

    Loading checkbox[] values

    @vigge_sWe: You can read the PHP and HTML FAQ if you want more details, though the documentation on this feature of PHP is incomplete. @freecrm: I know I bring this up all the time, but are you going to filter $_POST['checkbox']? What do you think about using a foreach loop over $send_array?
  16. M

    Loading checkbox[] values

    Did you set $checkbox to $_REQUEST['checkbox'] (and filter it)? Looking over the source, it appears not. I also observe that to access $checkbox, you loop over an index up to $_POST['rowstosend']. As the browser will only send a value for checked checkboxes, the array won't be set for the...
  17. M

    Need help loading a page before displaying it

    Once you get rid of the table, replace the JS rollovers with CSS rollovers and rename "wrapper" to "LoadingPanel", try setting the position of the loading bar panel to "fixed" and give it a high z-index. IE6 doesn't support fixed positioning. If you want to learn how to fake fixed...
  18. M

    Ajax confused

    Well, your PHP script returns "Available", but your JS checks for "okay". Also, rather than checking the username immediately upon keyup, you might want to schedule the check on a timer (plus an immediate check upon blur).
  19. M

    Extremely frequent downtimes in Cossacks.x10

    Does anyone know how many sites are served from each free host? Maybe x10 has just gotten too popular.
  20. M

    Changing root directory (index.*, etc.)

    Looks good. stephencope.net resolves to 216.245.203.58, which is cossacks.x10hosting.com. http://stephencope.net/ opens the main page. The server response is slow, but cossacks might just be under a heavy load right now. Edit: looks like cossacks was in the middle of going down when I...
Top