Jump to content

Ingolme

Moderator
  • Posts

    14,901
  • Joined

  • Last visited

  • Days Won

    177

Everything posted by Ingolme

  1. Ingolme

    Help PHP error

    It might have something to do with having > here: "username"=>array("User Name","text",""), And in many other lines.
  2. Wordpress also has documentation on how to make templates: https://codex.wordpress.org/Stepping_Into_Templates
  3. Ingolme

    read and use arrays

    You probably should initialize the arrays before the loop: $game = array();$host = array();$port = array();$queryport = array(); I don't know where $srv_rules is set, but that probably has something to do with it.
  4. The verb delimit: To fix or mark the limits or boundaries of; demarcate: A string is delimited by either single-quotes (apostrophe character) or double-quotes. There is one delimiter preceding the string, and another delimiter following the string. If you want to use a single-quote inside a string that is delimited by single-quotes you need to use a backslash. Look at how the syntax highlighter reacts to various strings based on what characters they contain: var str;str = "It's called a "delimiter".";str = 'It's called a "delimiter".'; //'str = "It's called a "delimiter".";str = 'It's called a "delimiter".'; Green means that the character is part of the string, black means it's outside of the string.
  5. In your first example "el" is being interpretted as part of the string because you haven't closed the string: In the second example you have quotation marks inside the string but you're closing the string before showing the variable. It doesn't matter whether they're single or double quotes. All the following options are valid: "resetScroller('" + el + "')""resetScroller("" + el + "")"'resetScroller('' + el + '')''resetScroller("' + el + '")' The backslash is used to put a quotation mark inside a string that's delimited by the same quotation mark.
  6. Print out the value of the string you're using as an SQL query to see what it says. echo "SELECT * FROM menu WHERE menu_accessible = '".sqlesc("yes")."' AND menu_u_class_read_min <= ".$CURUSER['u_FK_uc_id'];exit; // End program so we can read what was printed
  7. Ingolme

    offset

    I assume it's referring to arrays or similar structures. In an array, or any list-like structure of data, the offset is how far from the beginning you are, the beginning being zero. If this description doesn't seem to fit with the function you're looking at then show me the function.
  8. Ingolme

    script

    Checking that it's greater makes sure that if it somehow skips the exact bodyHeight value and has something larger the program will still stop the animation.
  9. Perhaps finding a wordpress plug-in, if there isn't one that does what you want you could create your own following this documentation: https://codex.wordpress.org/Writing_a_Plugin
  10. Ingolme

    UNIQUE KEY

    It creates an index called "username" which also happens to be the same name as the column. Indexing is a bit complicated, I can't explain it in detail from memory but if you're interested you can look it up. An index is a column you're expecting to use to search for data in the table. Tables are optimized to search for results fastest for columns that are indexed.
  11. Ingolme

    Percents

    Here's the documentation for the TO_CHAR function: http://docs.oracle.com/cd/B19306_01/olap.102/b14346/dml_x_stddev018.htm The first parameter is num-exp and the second is num-fmt. The expression for the num-fmt can only contain the symbols shown in this table: http://docs.oracle.com/cd/B19306_01/server.102/b14200/sql_elements004.htm#sthref394 The % symbol isn't there, so you can't use it.
  12. Nothing to do but a long series of subtractions. Since years don't have a fixed number of days a division won't cut it. Though you can assume years are 365 days and have an error margin of one day for every four years. On other words, divide by 365 times the length of a day: secondsRemaining / 31536000
  13. I'd love for you to show me one.
  14. Ingolme

    UNIQUE KEY

    There's a full reference for MySQL syntax here: http://dev.mysql.com/doc/refman/5.1/en/create-table.htmlAccording to it, this syntax is valid:col_name INT UNIQUE KEY And this syntax is valid as well:col_name INT,UNIQUE KEY index_name (col_name) The square brackets indicate that a symbol is optional. [index_name] can be omitted, resulting in this: UNIQUE KEY (col_name)
  15. Ingolme

    Formmail

    The page does not exist.
  16. Ingolme

    duplicate entry

    That is just a short way of writing the following $stmt = $mysqli->prepare("INSERT INTO test(id) VALUES (?)");if(!$stmt) { echo "Prepare failed: (" . $mysqli->errno . ") " . $mysqli->error;}
  17. Ingolme

    text files

    There's no general usage. Every single case is unique.
  18. Ingolme

    undefined variable

    In PHP global variables are not accessible from inside functions unless you use the global keyword or $_GLOBALS array. You can read about variable scope here: http://es1.php.net/manual/en/language.variables.scope.php
  19. Ingolme

    text files

    Plain text data. Whatever you want to use them for. I'm not sure why you're asking, maybe some context would help.
  20. OK, here's the same situation with different variables and functions. In this case, the function actually returns a value function a() { return 5;}var b = a();var c = a;alert(; // Shows 5alert(c); // Shows function() { return 5; }
  21. To find oút if the values are correct print out the values and see what they are: echo $CURUSER['u_FK_uc_id'];echo ' ';echo $of_array['of_u_class_read_min']; Check for yourself which one is larger.
  22. Ingolme

    types in phpmyadmin

    Yes.
  23. You can add a query string or a hash to the URL you're calling and get data from location.search or location.hash. For example: <a href="page2.html?link1">Link 1</a><a href="page2.html=link2">Link 2</a> switch(location.search) { case "?link1": alert("Link 1 was clicked"); break; case "?link2": alert("Link 2 was clicked"); break;}
  24. You gave your #nav element a z-index of 999, you have to reduce that number or give the search results box a higher one. Also notice that the z-index is only relative to the closest ancestor that has position "absolute," "relative," or "fixed." If the ancestor's z-index less than the z-index of the #nav element then it will still be behind. If you haven't set the z-index of the ancestor then its default value is zero.
×
×
  • Create New...