Jump to content

Ingolme

Moderator
  • Posts

    14,901
  • Joined

  • Last visited

  • Days Won

    177

Everything posted by Ingolme

  1. Which part of it is not working in Internet Explorer and which version of Internet Explorer are you testing?
  2. Ingolme

    Scroll down

    Put an element with an id attribute on the page at the point where you want the browser to scroll to. <div id="destination">Destination</div> Then put a link that goes to that element: <a href="#destination">Go to destination</a>
  3. You should not be using strings for this operation, work with arrays and then convert the result to a string (if necessary) when you're done. I also recommend using a set rather than a list to check for duplicate items. A set is a data structure where the item itself is its own identifier. Finding an item in a set is much faster than searching for it in a list. $already_used = []; // This is a set $list = []; // This is a list // Loop through results while($row = $stmt->fetch()) { // Make sure that the item is not already in the set if(!isset($already_used[$row])) { // Add the item to the set $already_used[$row] = true; // Add the item to the list list[] = $row; } } // If necessary, convert the result into a comma-separated string $output = implode(',', $list);
  4. All I can recommend is to search for documentation that will help you build extensions. Here's documentation for Internet Explorer: https://docs.microsoft.com/en-us/previous-versions/windows/internet-explorer/ie-developer/platform-apis/aa753620(v%3dvs.85) Here's documentation for Microsoft Edge: https://docs.microsoft.com/en-us/microsoft-edge/extensions/guides/creating-an-extension Internet Explorer is a complicated system to develop for, I would recommend building an extension in any other browser except Internet Explorer. Chrome is probably your best option for extensions because it is the most widely used browser and works on all platforms. If you were trying to build the same extension for all browsers, just build it for Edge instead of Internet Explorer.
  5. Array indices start at zero, not one. If an array has two elements you access them as $row[0] and $row[1], not $row[1] and $row[2]. The error happens because $row[2] does not exist.
  6. The section would be 100% height, with a header in it. The <video> element would be in the background using position: absolute and a negative z-index. A percentage height won't be recognized unless the document root also has a specified height, so the html and body elements need to be set to 100% as well. The following code is just the beginning, it's probably going to need tweaking so don't just copy it, learn from it. <section class="main"> <video></video> <header> [Logo] [Menu] </header> [More content] </section> html,body { height: 100%; /* Necessary to recognize 100% as 100% of the window */ } .main { height: 100%; position: relative; overflow: hidden; } .main video { position: absolute; z-index: -1; min-width: 100%; min-height: 100%; width: auto; height: auto; top: 0; left: 0; } .main header { color: #FFF; background: #000; }
  7. My first advice is to never trust Dreamweaver's preview, it's wrong. Test your website in a real browser. From what I see on your website, your code links to a CSS stylesheet that does not exist on the server. You have to upload all of HTML and CSS files for your website to work. This is not a problem with your web host, this is happening because you forgot to upload a file, or uploaded it to the wrong location or with the wrong name.
  8. It's not an element and it cannot be controlled by the browser. It is a UI widget that belongs to the operating system.
  9. Ingolme

    Javascript in PHP

    That code will work as long as the contents of $string do not have a single-quote because the single-quote will close the Javascript string. If you want to protect the code from that then you can use the addslashes() function before using $string.
  10. That means that there is no link to the stylesheet or the path to the stylesheet is incorrect. What code did you write to use the stylesheet?
  11. This is the code that is being used in the first example to put three cards on one row: <div class="w3-row-padding" style="margin:0 -16px"> <div class="w3-third"> <div style="height:100px" class="w3-card w3-container w3-yellow w3-margin-bottom"><p>w3-card</p></div> </div> <div class="w3-third"> <div style="height:100px" class="w3-card-2 w3-container w3-margin-bottom"><p>w3-card-2</p></div> </div> <div class="w3-third"> <div style="height:100px" class="w3-card-4 w3-container w3-yellow w3-margin-bottom"><p>w3-card-4</p></div> </div> </div> When you see styles on a page that you like, you can open your browser's developer tools and inspect the elements. In most browsers you can do this by pressing F12 or by right-clicking on the object and selecting "Inspect element..."
  12. I see no obvious errors in that code. It could be that the stylesheet was not included properly.
  13. Ingolme

    using OR in MySQLi

    It will function without throwing any errors, but I can't tell you if it meets your requirements because I don't know what your requirements are. I would recommend that you run the code for yourself, testing it with different values, and see whether it gives you the results you want it to.
  14. Ingolme

    using OR in MySQLi

    No, that won't work. You have four placeholders but only three values.
  15. Ingolme

    using OR in MySQLi

    This is how the OR operator is used in SQL: $stmt = $conn->prepare("SELECT id, user, title, date, show_post FROM post WHERE show_post = ? OR show_post = ? ORDER BY id DESC"); $stmt->bind_param("ss", $Db1, $Db2);
  16. The mail() function works with line breaks. Just put a line break in the message that you're sending. It will take a day or two for a domain name to be assigned to an IP address. That's not an issue, that's just the nature of the internet. It takes time for the millions of DNS servers across the world to update their records when a domain name has been assigned to a new IP address.
  17. If your web host has sendmail enabled, the simplest way to send e-mails is to use the mail() function. All you need to do is pass a few strings into one function to use it. It is very primitive and doing things like attaching files or sending formatted e-mails is difficult. The PHPMailer library is much more flexible and has many more features. It requires more code to start off, but overall it makes attaching files, sending mail through an SMTP server and formatting mail with HTML much simpler than with the mail() function.
  18. The document.cookie property is just a long string with all the cookies and their properties in it. The only way to get a cookie out of it is using string manipulation functions to get the pieces of the string that you need. There is no easier way to do it. If you use the localStorage API instead of cookies you'll have an easier time. Here's a page describing how to use the localStorage API: https://www.w3schools.com/jsref/prop_win_localstorage.asp
  19. It is an attribute, so the usual attribute selector will work.
  20. What you had before would have worked if you had added the `title` field to your select statement. You've replaced it with $row[6] which is probably not going to work.
  21. By omitting the action attribute the form submits to the same page.
  22. When you use jQuery and its plugins they often put additional classes on the elements. See if any of the class methods in jQuery help solve your problem, if not then you probably should use data attributes instead of the class attribute to store data. Here's how data attributes are defined: <element data-something="value1" data-somethingelse="value2"> In jQuery you can access the value of data attributes using the data() method: http://api.jquery.com/data/#data-key
  23. If you have the rest of the source code from that page you should be able to see which libraries are being included. It is either a jQuery plugin or not jQuery at all.
  24. You did not select "title" from the database in your query.
  25. It would appear PHP is not printing any of the error messages. You're going to have to either find a way to enable error logging on the server or go through the procedure of cutting out code until it starts giving a useful response.
×
×
  • Create New...