Jump to content

Ingolme

Moderator
  • Posts

    14,901
  • Joined

  • Last visited

  • Days Won

    177

Everything posted by Ingolme

  1. You should check the source code of the generated page to see what URL shows up in the src attribute of the image. Like I said before, wrap the variable in curly braces to make sure it's interpreted correctly by PHP.
  2. If that's a PHP string, you should wrap the $Row[25] in curly braces ( <img src={$Row[25]} height=\"325\" width=\"380\"> ), otherwise it's just going to print the string "Array". PHP variables are case-sensitive, so make sure that the variable's name is $Row and not $row.
  3. I actually find that caniuse.com is lacking in information. I prefer to check the Mozilla Developer Network for compatibility https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Browser_compatibility
  4. echo is used to show something to use user. The return keyword is used to send data from a function to the code that called the function.
  5. Your functions should be using return, not echo.
  6. AngularJS is designed to be used in a browser. It relies on the existence of a window object, but server-side Javascript does not have a window.
  7. The Javascript to parse the hash would be on the page that the e-mail links to, not in the e-mail itself. E-mails cannot have Javascript in them. It is not a good idea to use the hash to send data, the hash should generally only be used as it was originally intended, as an anchor to a specific part of the page. When you're using a third party application you have to play by their rules. If their application isn't compatible with your software then you will have to find a different one or build your own.
  8. Everything following the # and the # itself is called a hash. The hash part of a URL is never sent to the server and is only seen by the browser. Its original purpose was to jump to a specific section on the page, but in this example and in many other common applications it's used to provide information that Javascript can read. In the case that there's both a query string and a hash, it's usually because the query string has information that the server needs while the hash has information for the browser. The hash cannot replace the query string. The hash does not naturally have key=value pairs like the query string does, it just contains an arbitrary string which can contain & and = characters. People write Javascript code to parse them and treat them as if they were query strings, but they are not.
  9. It might be related to this: https://stackoverflow.com/questions/2545542/font-size-rendering-inconsistencies-on-an-iphone It's an issue I've encountered before where iPhone browsers try to enlarge text that's too tiny in order to make it readable. Try adding this to your stylesheet to see if that fixes the issue. body { -webkit-text-size-adjust: 100%; }
  10. The rawurlencode() and encodeURIComponent() functions transform any non-ASCII values into ASCII, that's exactly what they are for. I said query string components, which refers to these sections: ?a=component1&b=component2 If you do not escape =, ? and & in those values then you will not get the values you expect in the server. The following example is a query string that will not give the desired value on the server: ?candy=M&Ms. If you do not escape the &, then the server will see a key "candy" with value "M" and another key "Ms" with no value.
  11. Encode the components. In PHP you can use rawurlencode(), in Javascript you would use encodeURIComponent. Here's how it's done. A Javascript example: var url = "http://www.example.com?a=" + encodeURIComponent(something) + "&b=" + encodeURIComponent(somethingelse); A PHP example: $url = "http://www.example.com?a=" . rawurlencode($something) . "&b=" . rawurlencode($somethingelse);
  12. The input tag does not save the file on the server, it just transmits the file data across the internet. The actual saving of the file is being done by server-side code that you wrote. You write the software that saves files and keeps track of them. When you delete a record from the database, the record needs to provide information about the location of the file on the server. Before deleting the record, find this information and use it to delete the file.
  13. I don't think anybody on the forum regularly works with Node.js or Raspberry Pi. I'm actually surprised to see a whole Raspberry Pi section in the W3Schools tutorials.
  14. Since <h3> elements are naturally blocks, all elements that follow them will be below them. If that's not happening then somebody has either set it to be inline or floated it. If it's inline, you can set it back to a block using the display property. If it's floated you can either reset the float property using float: none or you can set the clear property of the element that follows the <h3> element.
  15. Like I said, there probably is an element with the exact shape of a black circle that is covering up your background image. I'm going to take a stab in the dark and suggest using this code: .social-menu .menu-item a { background: none; } You really should open the developer tools (by pressing F12 in most browsers) and look at the elements for yourself to see what they're doing. You haven't provided me with enough information so all I can do is make guesses. I don't know what HTML structure you're using to add the new icon, which is the most important part.
  16. I can't tell what's going on there from just a screenshot. My guess is that something else is creating a black circle which is covering your background image.
  17. The width and height of the element should be 36px to match the image, but you've set the width to 50 and haven't given it a height. You can move the image if necessary using the background-position property, but the image is the correct size, so that shouldn't be necessary. You should keep the no-repeat rule because you don't want the image to repeat.
  18. There are more styles being applied to the element than the ones you're showing here. With a width 100% and absolute positioning, that may be the result you get. Absolute positioning disregards the padding of the parent element, so the missing space on the right side would correspond to the additional space being taken up on the left.
  19. You'll have to override the float rule using the !important declaration. Then you can center the link by setting the text-align property of the .navbar element.
  20. Your code editor should save the file with a UTF-8 encoding and your HTML page should specify that encoding using a <meta charset="UTF-8"> tag.
  21. If you have XAMPP installed, when you turn it on, the files that are inside the htdocs directory of your XAMPP installation will be accessible through the localhost domain in the browser, like this: http://localhost/file.php It might be that you had a Chrome extension that creates a local server like this one: https://chrome.google.com/webstore/detail/web-server-for-chrome/ofhbbkphhbklhfoeikjpcbhemlocgigb?hl=en Just like XAMPP, the Chrome extension requires the files to be in a particular folder and accessed through a particular domain (127.0.0.1:8000)
  22. Ingolme

    photo files

    $scanned_directory is already an array so you cannot use explode () on it. Perhaps you intended to use implode ()
  23. You have to use the localhost domain to run PHP. Opening the PHP file directly will not work.
  24. For any external link, on your own server you can use the referrer header $_SERVER['HTTP_REFERER'] to know the URL of the page that the user was on when the user clicked the link. Some browsers may be configured to not send this for privacy reasons. It is not normal to ask somebody to put PHP code on their server, but you can tell them what HTML to use for the link. If you can make deals with the person who is linking back to you, a common technique is to add a query string to the link which provides information. You would give a different query string for each website that links back to you.
  25. Ingolme

    photo files

    There are many ways to look at the contents of a directory using PHP. scandir() opendir() DirectoryIterator glob() I don't see a need to use numbers as filenames, overall it actually becomes more difficult to manage because conflicts may occur when two or more users are creating files at the same time.
×
×
  • Create New...