Jump to content

Ingolme

Moderator
  • Content Count

    14,049
  • Joined

  • Last visited

  • Days Won

    68

Everything posted by Ingolme

  1. Ingolme

    Query not working

    "Affected rows" usually only counts the number of rows that were modified or deleted. If you want to count the number of rows that were selected, you can either loop through the rows you received and count them or or use a SELECT COUNT(*) query.
  2. I don't know how this "owl" plugin works, you should check their documentation. Open the Javascript console in your browser to check for errors as well.
  3. Confirm is a function, so call it with parentheses: return confirm("Do you want to continue?"); I would recommend putting this code in an submit event of the form rather than the click event of a button, so that even if the user submits the form through other means (pressing Enter in the text field) the code will still run.
  4. UTF-8 is a good encoding, but your text editor should be using UTF-8 without BOM (Byte-Order Mark). The option to choose with or without a BOM should be available in your code editor.
  5. Looks like it's a byte-order mark. https://www.fileformat.info/info/unicode/char/feff/index.htm
  6. They're invisible, so you won't see them. They're visible in a different encoding, this is what I get when I change the invisible characters to ANSI encoding: These segments "" are visible representations of some UTF-8 characters which are in your code. Your code editor is probably putting them in there.
  7. contains() is a function which returns true if the element has the class and false if it does not. It is not a direct replacement for toggle(). You have to write code which will check if the class already exists, if it does then use remove(), if it does not then use add().
  8. No, background-image works fine and serves a slightly different purpose than background. What I am noticing in the code that you are pasting here is that there are a lot of invisible characters which are probably interfering with your CSS code. Which text editor are you using to write your code?
  9. I believe that the toggle() method of classList is not supported by Internet Explorer. You can work around that by testing classList.contains() and then using classList.add() or classList.remove() based on whether it already has the class or not.
  10. Open the developer tools in your browser to see what it going on. In most browsers you can open them by pressing F12. Note that the body is only as tall as the content within it, so you will only see the image behind the first line of text.
  11. The images folder is not a child of the CSS folder, this is why you have to climb out of the CSS folder to find it, by prepending "../" to the path. Assuming that you described your filesystem accurately, the path you are looking for can only be "../images/Art 1.jpg". There should not have to be any guesswork here, use the correct path and if that is not working then the issue is not with the path, it is elsewhere. Watch out that your text editor is not creating curly quotes instead of ordinary quotes. The quotes in your previous post would not work because they are curly quotes. This is what curly quotes look like ( ‘ ’ “ ”). The quotes you should be using look like this:( ' ' " "). For URLs, CSS accepts single-quotes, double-quotes or no quotes at all.
  12. The correct path would be: body { background-image: url ("../images/Art 1.jpg"); }
  13. URLs in external stylesheets are relative to the location of the stylesheet itself rather than the page. I can't tell if this is your problem or not since I don't know if your CSS is in an external stylesheet.
  14. Images are inline by default. All inline elements are placed at the text baseline. There is always a bit of space reserved below the baseline, which is for hanging letters like "g" or "y", and you see this space below the image. In order to fix this, you can either make the image a block, or set its vertical align to "middle".
  15. The variable "txtWeight" is not initialized anywhere and there is no such thing as a "result" property on ordinary HTML DOM elements.
  16. The buttons are inline elements inside each "row" block, so you can center them by setting the text-align of the row to center. .row { text-align: center; }
  17. Ingolme

    SQL Tryit Editor

    What code did you use?
  18. I don't know of any most popular editor, each person just goes with what works best for them. I mostly use Notepad++ and Atom at my job. I hear Sublime is popular, but it costs money. I don't know much about SciTE, but from what I saw of it, it looks pretty primitive. It might be useful for editing local files on a Linux machine, but I'm not sure it has enough features to do serious software development.
  19. This editor is not familiar to me, but here is an article indicating how to make SciTE save files with UTF-8 encoding: https://cstan.io/?p=8557&lang=en
  20. The problem is that your text editor is generating an ANSI or ISO-8859-1 file, but the PHP engine things it's UTF-8 so it is being misinterpreted. You code editor, Notepad, Visual Studio, Sublime, Atom.io, DreamWeaver, whatever it is, needs to save the file with a UTF-8 encoding.
  21. It's not a PHP setting, you need your text editor to set the encoding of your PHP file to UTF-8. Which code editor are you using to write code?
  22. It is likely that your PHP file is not encoded as UTF-8. Your code editor should have the ability to set the encoding to UTF-8.
  23. It looks like a mistake. You can let the staff know by clicking the "REPORT ERROR" button at the bottom of that page.
  24. It works fine for me. The browser is parsing these entities before showing them to you on the screen, so you won't see something like "&lt;". If you want to see the entity codes without the browser parsing them then output your content with a plain text header. <?php if(isset($_POST['char'])) { header('Content-Type: text/plain'); $char = $_POST['char']; $char2 = htmlspecialchars($char); $char3 = htmlentities($char); echo "Teclado: {$char}\r\n"; echo "Repuesta 1: {$char2}\r\n"; echo "Repuesta 2: {$char3}\r\n"; exit; } ?> <form method="POST"> <input type="text" name="char" size="6"> <input type="submit" name="submit" value="Search!" /> </form>
  25. You should go through the SQL tutorial, there are tons of example of SELECT queries. This is very basic SQL, if you cannot spot the syntax errors then you're missing the most basic knowledge of SQL. We've gone through this before in other threads, you can't just take code from somewhere else and make random edits in the hopes that it will work. You need to understand the language you're working with. I am not even going to get into the SQL injection vulnerabilities in your code, but that is something you should do some reading on as well if you don't want your website to be hacked.
×
×
  • Create New...