Jump to content

requinix

Administrators
  • Posts

    15,227
  • Joined

  • Last visited

  • Days Won

    427

Everything posted by requinix

  1. The question is do you want your entire website to be completely broken if you have a database issue? I mean, not even able to render an error page? Basic configurations are typically done in files because they're far more reliable, not to mention easier to modify and faster to read. Is there a particular reason you'd like to do a database instead?
  2. The width and height of the canvas are different from the width and height of the canvas element. What you've done is resize the element, however it will remain at its default drawable dimensions of 300x150. If you want to resize the canvas itself then you need to update its .width and .height. https://developer.mozilla.org/en-US/docs/Web/HTML/Element/canvas
  3. One of many. Lots of resources out there because different things work better for different people.
  4. There is no "should" here. It's like asking whether you "should" swing a hammer with your left hand or your right hand: the majority of people will probably be using their right hand because that works for them, but as long as you're doing a good job of it, there's nothing that says you can't use your left. IMO, for the most part if you need a container (like for background styling or padding/margins or as a position:relative-ed parent) then you can probably use the <body> for it. That can be styled just as easily as a <div>. You need to specify what you need to specify. If you need a height then use a height. If you need a width then use a width. With CSS, remember one rule of thumb: less is more. Start with a minimal amount of CSS and only add when you need to correct or improve anything. The more CSS you add, the more complicated it gets, and the more likely your changes will be creating problems instead of solving them. What? Completely different things. The box model is a general description of how sizes and borders and margins and stuff work together. For instance, "if you specify a width then does that include the border?" Flexbox is a technique for layout, like grid display (newer than flexbox) or nested <div>s (older) or tables (much older). What gap? What connection? Percentages are fine if you want relative measurements. But learn a little bit about all the different units available - because there are a lot more than most people know, and many of those are more appropriate than percentages. Coming up with a responsive design that supports large desktops, small laptops, and mobile devices.
  5. Stop dealing with fractional measurements and relative percentages and switch to flex. https://developer.mozilla.org/en-US/docs/Learn/CSS/CSS_layout/Flexbox
  6. If you have problem getting your code to work then you should probably post that code. Because we'll be a lot more inclined to help if we can see what you have so far than if we had to try to do everything for you...
  7. Assist with... what? What code have you written? What about it is or is not working?
  8. Despite starting with the same letter, PHP and Python are two different languages. The #1 rule of Python is to get your code indentation correct. Yours is very much incorrect. Try fixing that.
  9. Have you tried adding that template you have for the comments into the page you already have that shows the post?
  10. But why? If my billing and shipping addresses are the same then why do I have to type it in again?
  11. Does your code also say "funciĆ³n" and "definido" and "prueba/captura"? Post your actual code.
  12. Make sure you have error logging enabled everywhere - and, of course, are checking those logs. That includes making sure the command to run your Python script is putting its and stderr to someplace you can see.
  13. There is no automatic thing anywhere that will change a string value to attach a timezone to it simply because it looks like a date. Your application will have some sort of explicit code to do this, and the first place I would look is whatever powers that "userobj" object. Try searching there, or worst case search your whole codebase for usages of terms like "timezone" or maybe even "EDT" itself.
  14. 7.4 is the version of PHP, not the version of Windows.
  15. No. It doesn't. Then you'd be wrong. You're thinking about this in a very narrow-minded way. Imagine this. You are walking along in a neighborhood and see a house. In the window is a sign that says "Do not break and enter through this window". What do you think when you read that? Don't let it be open to the internet and use prepared statements. Of course < > symbols have nothing to do with that, so I'm going to assume you also meant to ask "what's the best way to secure my website from XSS" and say to use functions like htmlspecialchars() when outputting unsafe strings.
  16. Exactly what does "won't allow" mean? Do you see one of your error messages? Which one?
  17. No. Stop thinking that. Restricting people from typing certain things is not security. In fact it's the opposite of security because now you've told the rest of the internet that you have a very specific vulnerability when it comes to rendering certain user-provided values in your website. Doesn't matter. You could be storing the username in a database, or a text file, or you could even be emailing yourself a copy of their registration. Does not matter.
  18. Characters are unsafe according to how you (mis)use them. Preventing people from using < > because it would mess up your HTML is absolutely the wrong solution. If you want to prevent people from using < > because you don't think usernames should contain those kinds of symbols, that's something entirely different.
  19. What do you see happening and what is it that you expected to see? In detail.
  20. I take it you're not familiar with that syntax? https://www.php.net/manual/en/function.echo.php
  21. The header/content/footer style is at least 10 years out of date. Templating is better. Approaches vary, but the point is that you have a single file containing the entire template for the page, and you insert content in the places it needs to go. <!doctype html> <html> <head> <title><?= $title ?></title> etc. </head> <body> <?= $body ?> </body> </html> If you don't want to render your output to strings, things like $title and $body can instead be functions that are called and output what they want directly.
  22. Looks like a prepared statement, which is good and would avoid the SQL problems. Have you turned on whatever "debug" support this class offers? Checked error logs?
  23. HTML 4? mail() function? Where are you getting this from?
  24. No, there is no way for you to access or control that sort of information.
  25. Not being able to share any code is going to be a problem. Surely you can post a few lines from some select locations? The most likely culprit is an improper SQL statement that let the data somehow corrupt the query, causing it to fail. For example, if it contains apostrophes and quotation marks. Knowing what data is not being inserted would be nice so that you could look for a pattern in what does and doesn't work.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.