Advanced Search

Search:

Type: Posts; User: blm126; Keyword(s):

Page 1 of 20 1 2 3 4

Search: Search took 0.02 seconds.

  1. Replies
    19
    Views
    50,280

    How about SQL? No one ever seems to comment...

    How about SQL? No one ever seems to comment their queries...

    Single line


    SELECT * FROM some_table--Comment

    Multiline
  2. Replies
    1
    Views
    2,131

    Custom Events: Best way?

    Ok, so I'm working a project where it is helpful to have custom events. This is how I'm doing it.


    var hooks = {//Custom events object
    hooks: {},//Store an event handler
    add:...
  3. Replies
    10
    Views
    3,522

    Not really in theory. However, the code you have...

    Not really in theory. However, the code you have posted here has a huge security hole. Basically, if PHP code gets passed to clean_field, it will be written to your log file(which is a PHP file). ...
  4. Replies
    5
    Views
    2,423

    Yes, cookies would be enough. Though, be aware...

    Yes, cookies would be enough. Though, be aware that this will require a call to the database that could be avoided with sessions(at the price of checking for session hijacking). As long as you...
  5. Replies
    9
    Views
    2,662

    This sounds like a mime type problem. I seem to...

    This sounds like a mime type problem. I seem to remember from somewhere that IE is very particular about the mime type of Javascript files. Ok, a quick Google search turned up this.
    ...
  6. Replies
    5
    Views
    2,423

    Sessions: More secure than cookies. A session...

    Sessions:
    More secure than cookies. A session can last as long as the cookie that is set. Session data is stored on the server, so user's can't mess with internal data stored in a session. ...
  7. Replies
    10
    Views
    3,522

    I don't get why you would want to log it. Just...

    I don't get why you would want to log it. Just prevent the injection(which, as Twey said, depends on where the data is going). The log want show you any useful information. It's the hacks that...
  8. I use http://dean.edwards.name/packer/ . Set it...

    I use http://dean.edwards.name/packer/ . Set it to shrink variables if you just want obfuscation.
  9. Replies
    9
    Views
    3,308

    I think your missing the point I'm trying to...

    I think your missing the point I'm trying to make.


    var test = "global var";

    is exactly equivalent to


    window.test = "global var";
  10. Replies
    9
    Views
    3,308

    What? var...

    What?


    <script type="text/javascript">
    var test = true;
    alert(window.test);//Will output true
    </script>

    The use of the "var" keyword when not in a block scope(aka global scope) causes that...
  11. Replies
    10
    Views
    3,522

    No, it is opening another huge security hole. ...

    No, it is opening another huge security hole. Consider what would happen if "#<?php unlink('index.php'); ?>" was passed to clean_field(). This is an even bigger security hole than SQL injection.
  12. Replies
    9
    Views
    3,308

    This was just bothering me. :) Maybe I'm just...

    This was just bothering me. :) Maybe I'm just weird, but I would write it like this.


    function init(){
    window.map = new OpenLayers.Map( 'map',{maxResolution: 0.703125} );
    }
    I like this way,...
  13. Ah, well. No file should be that long. Nor...

    Ah, well. No file should be that long. Nor should it be growing. This either sounds like some weird bug, or some weird hack attempt. Without seeing the file in question, I can't really say.
  14. Replies
    10
    Views
    3,522

    The function substr_count_array isn't needed. ...

    The function substr_count_array isn't needed. Your regular expression handles that. However, that is the wrong way to go about it. All you need to do is make sure that all data is run through...
  15. Replies
    3
    Views
    3,371

    In some browsers you could accomplish what you...

    In some browsers you could accomplish what you want by using a popup(where it is possible to disable certain parts of the browser UI). For this to have a chance of working you need to be able to...
  16. Replies
    4
    Views
    1,912

    onLoad will not execute until the entire page has...

    onLoad will not execute until the entire page has been loaded. So, it can be used for what you want, although I would recommend against using JS to style the page like this. Your page will break if...
  17. Replies
    6
    Views
    2,795

    Browser support and Script layout

    So, lately I've been rewriting a script of mine, and I've been wondering. When you write a script, what browsers do you support? And, when you use a script written by someone else, what browsers do...
  18. Replies
    1
    Views
    1,787

    Ok, I glanced through the code. I didn't notice...

    Ok, I glanced through the code. I didn't notice any obvious problems, so my advice is going to be pretty general. What you need to check is what data the application is keeping track of. Check the...
  19. Replies
    12
    Views
    3,424

    Most likely, the page isn't loaded when you are...

    Most likely, the page isn't loaded when you are trying to run that function. I need to see the whole page to be sure. But, if I'm right then try this code and see what happens


    function...
  20. This doesn't look like a problem in MySQL this is...

    This doesn't look like a problem in MySQL this is a regex problem. You seem to be using a regular expression without knowing what it is intended to match. If you just want to match most email...
  21. Replies
    5
    Views
    4,919

    Are you sure you want getElementById? You said...

    Are you sure you want getElementById? You said you wanted ".banner" which looks like a class to me. Without seeing the page in question it is hard to help.
  22. Replies
    5
    Views
    2,585

    Really? I don't know a lot about SQL tuning. ...

    Really? I don't know a lot about SQL tuning. However, I would think that an inner join wouldn't be any more efficient than another query. Plus, if the query was run often, the sub query would end...
  23. Replies
    31
    Views
    36,054

    Untested, but a lot cleaner than what you had ...

    Untested, but a lot cleaner than what you had


    <?php
    putenv("TZ=Pacific/Honolulu");
    include('cal-connectdb.php');
    $today = date ('Y-m-d');
    $query = " SELECT `event_id`,`event_title`,...
  24. Replies
    3
    Views
    3,019

    This is really the long way around the problem. ...

    This is really the long way around the problem. Use SQL to get the column names you want. Here is the query you would need. I'm not really sure what you want to do with this data though.

    ...
  25. Replies
    5
    Views
    2,585

    Like Twey said, this should be done in SQL....

    Like Twey said, this should be done in SQL. However, I don't really like the SQL he used. I would write the query like this.


    DELETE table_1 WHERE friend_email IN (SELECT email FROM table_2)
    ...
Results 1 to 25 of 500
Page 1 of 20 1 2 3 4