Jump to content

Ingolme

Moderator
  • Posts

    14,901
  • Joined

  • Last visited

  • Days Won

    177

Everything posted by Ingolme

  1. The image is floated to the left, so all the rest of the content will be on the right of it. You should remove the float property from the image and wrap the image and paragraph into another element.
  2. I don't see an issue on the example page you showed, what is it doing now and what did you expect it to do?
  3. There are tens of popular server-side languages and hundreds of Javascript frameworks. You can't have all of them, so you have to choose some if you want any at all. W3Schools chose PHP and ASP/.NET as server-side languages and jQuery and AngularJS for Javascript frameworks. Honestly, I would even go with dropping the tutorials for the frameworks since they're not even W3C standards. Every Javascript framework already has an in-depth tutorial on their own website.
  4. Turn off debugoutput in your PHPMailer settings. That's what's causing the problem. You still should have HTML last. If another problem occurs then find out why and fix it.
  5. It's not necessary to separate it into two files. It doesn't matter if there's PHP embedded in the HTML, you just have to put the form processing logic before the code that prints out the HTML. Do that first, then if you're getting errors find out what's causing them,
  6. Headers have to be sent before any content. There should be nothing between the start of the document and the opening <?php tag. HTTP messages are divided into two sections: The headers and the body. The headers contain information about the page, while the body contains the actual page itself. The headers must always come first. Any header sent after the body was sent will actually be considered part of the body, but rather than doing that PHP will give you a warning instead. The HTML must go last, after all the PHP, not before it.
  7. The concept is simple: All processing first, HTML last. Move all output to the bottom of your code. The first thing in your document should be an opening <?php tag. The code in your post does not have the HTML in it, which is crucial for understanding how to fix your problem. No HTML can be printed before a header() function call, or session_start() or setcookie() either.
  8. Putting the styles on the link itself is the best solution: .SocialMediaMenu li a { /* ... */ }
  9. You should have the PHP run first, then the HTML. Here's the general structure of my PHP applications: <?php // Form handling logic if(isset($_POST['submit')) { // If submission was successful // Do something header('Location: http://www.example.com/target.php'); exit; } // Set variables for use in templates $template = 5; // Include a template file include 'template.php'; ?>
  10. It won't change what you see on the directory index, URL rewriting just changes how the server interprets URLs, You can't change the default directory index, but you can override it by creating an index.html file.
  11. Headers can only be sent before anything is printed. If you're not printing anything and it's pointing to the first line of your document there are two possible reasons: There's a space or line break before the opening <?php tag The document is saved as UTF-8 with a byte-order mark (BOM). Eliminate all whitespace before the <?php tag and make sure to save your documents as UTF-8 without a BOM.
  12. You're getting a 404 error. That means the path is wrong. Perhaps the URL you want to use is "/member/login.php"
  13. Check the network tab in your browser's developer tools to see what response you're getting from the server. Location headers in AJAX requests won't do anything, if you're using AJAX you have to do the redirects using Javascript using the location object.
  14. If you want to apply a style to multiple elements, use the class attribute. The ID attribute is intended to identify one specific element on the page, it is designed that way to make accessing elements in Javascript more efficient. Instead of traversing the DOM tree, the browser already has pointers directly to all the elements that have IDs.
  15. You can convert your files to UTF-8 in any text editor. If you're working with code, you'll have to create a function that encodes the bytes as UTF-8, many programming languages have built-in functions for that.
  16. Ingolme

    HTML

    You should start by reading the tutorials. If there's something specific you don't understand then we can help you. Geolocation does not work without the user specifically agreeing to it. When a page uses geolocation, it first asks the user whether they want to provide their information. Due to security restrictions, the browser has almost no information about the device that's running it. You can pull basic information out of a user agent string such as browser and operating system, but even that is unreliable. The best way to get information from somebody is to trick them into giving it to you, but you should watch out because some of the techniques to do that are illegal.
  17. That would be fine if you were coding for a website, but HTML emails need to be simple. if you want it random, you'll have to create several different images with the pictures in different orders.
  18. There isn't enough information to go on. The images may not necessarily have to be in the background, you could have a set of <img> elements in a row. Or try multiple table cells, each one with its own background image.
  19. There seems to be some framework and data structures that are not described here, leaving parts of the code that I have no way to know what it's doing. Try to reduce this to its most basic components. Which is the part of the code that's getting the POST data and putting it into the database?
  20. If you check the network tab of your browser's developer tools, each time you click a color you'll see a request go out for an image. Here's one of them. http://hanes.scene7.com/is/image/Hanesbrands/HNS_HO5944_ChiliPepperHeather?defaultImage=Hanesbrands/HNS_HO5944_AwesomeBlueHeather&id=Cd9S33&wid=490&hei=622&fmt=jpg
  21. Use "==" for comparison. A single "=" is the assignment operator, which changes the value of the variable you're operating with. You can use a switch() statement as well to make your code more readable.
  22. April Fools' Day isn't until Saturday.
  23. The answers are in the CSS tutorial: https://www.w3schools.com/css/css_howto.asp
  24. You should go through the CSS tutorial first, everything should be answered there. There's no point just copying and pasting code, you need to understand what it does.
×
×
  • Create New...