Search results

  1. M

    PHP Variable in URL

    I guess it depends on what he's using the URL for. It's not clear what the OP's purpose it. I was assuming he wanted to set the attribute of an element to the URI, in which case he'd want urldecode. If he's printing the URI as content, then you're right; htmlspecialchars() is the way to go. If...
  2. M

    Project please help

    If you don't understand how to do any of the following Firebug tasks, read a Firebug debugging (Michael Sync's tutorial looks good). Switch to 'fadein.js' and set a breakpoint (that red dot) on the 'for' loop that adds the load event listener. First thing you'll notice is you can't inspect...
  3. M

    PHP Variable in URL

    For URIs, urlencode/urldecode are more appropriate.
  4. M

    Project please help

    Did you try Firebug?
  5. M

    mod_rewrite outside of public_html?!? & dir hiding

    I see now. Sorry about the misunderstanding. People keep writing they want to "hide a directory" and mean many things by it. Your explanation is very clear. It's tricky to do what you're trying with just mod_rewrite, due to the mutually recursive rules. You might want to consider using a...
  6. M

    Project please help

    That particular line is executed before the body even loads. <td id="chalkboard"> doesn't exist yet. Either load the script at the end of the body or hook the load event for window. If you don't have it instaled, get Firebug. I bet you would have figured this out on your own with it...
  7. M

    Perl?

    Your script works for me on Absolut. Perhaps there's something wrong with the server configuration, either host-wide or something in your root .htaccess. What are the permissions for cgi-bin? Is there anything in your error log? Try something even simpler: #!/usr/bin/env perl print...
  8. M

    Trouble getting a Javascript to wrok

    You're having the same problem rhyeen just had. Your image files have a '.JPG' extension but you refer to them with a '.jpg' extension. In general, URIs are case sensitive. The solutions are simple. Rename the files to have a lowercase extension. Add 'Options +MultiViews' to your site...
  9. M

    SQL moving a field within a table

    When you export or import a table, you can specify field order. No need to change the table definition. You should alter tables only if necessary for what you need to store in the table. An alternative is to create a view and export from that. If you still really, really feel like you need...
  10. M

    noob sql question

    To expand on this, x10 DB servers appear to use Unix sockets, which is used similar to an IP socket but doesn't itself use any networking facilities. It's simply not possible to connect to a Unix socket from another computer. Sockets exist in the filesystem namespace (e.g...
  11. M

    mod_rewrite outside of public_html?!? & dir hiding

    Patterns starting with '/' don't match when RewriteBase ends with a '/'. Use '^/?' rather than '^/'. Also, your rules undo each other, so they won't do what you want. There are better ways of preventing directory indexing. Do one of: turn off auto-indexing for the folder by creating its own...
  12. M

    Help me connect to my MYSQL

    That's a code fragment, not an error. What's the error message you're getting?
  13. M

    search mysql

    When asking about code, state the behavior you expect and the behavior you get. We can't necessarily intuit what you're trying to do. If you're getting an error message, post the error message. Offhand, I'd say the problem is $find isn't defined. register_globals hasn't been set by default...
  14. M

    last question, i promise, lol

    Another one: can field user_id be NULL? What's the definition for the user_id column?
  15. M

    preg_match/if statements, can't quite grasp it...

    This post was originally an accidental duplicate. It's now marked for deletion.
  16. M

    preg_match/if statements, can't quite grasp it...

    When asking about code, post short samples (minimal test cases, actually). Without this, it's hard to help you with mistakes you might be making. Also, describe the overall goal (why are you trying to do whatever it is?) in addition to the specific task. Sometimes there's a better way of...
  17. M

    another php/sql question!

    You also need to sanitize your input. Is users.name unique?
  18. M

    CSS trouble

    Safari's web inspector (Firefox's DOM inspector works as well--gotta love 'em) reveals you've got a ruleset with selector "body, td" in /coredocs/tf_main_css.css that sets color; thus the color property for td won't inherit from table.error. Add: table.error td { color: inherit; }
  19. M

    noob sql question

    It's nice to understand how things work, isn't it? Almost. On a VM, localhost is the VM (as opposed to the physical machine running the VM or any other VMs running on the physical machine). For a program running on bare iron, localhost is the physical machine.
  20. M

    mod_rewrite outside of public_html?!? & dir hiding

    Make the new URI absolute by adding a leading '/'. RewriteRule ^dir/(.*)$ /$1 [R] Also, the {1} is unnecessary. It causes the previous atom to match just once, which is the default behavior. As for what's going on, the RewriteBase documentation has some hints.
Top