-
Posts
15,229 -
Joined
-
Last visited
-
Days Won
427
Everything posted by requinix
-
Can search engines crawl content of .php files?
requinix replied to eaglehopes's topic in Application Design
Modern search engines don't care as long as the URLs can uniquely identify the content they show. -
An SVG of that image would be very small...
-
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?
-
Why drawing on canvas resizing/scaling with canvas size?
requinix replied to eaglehopes's topic in HTML Help
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 -
One of many. Lots of resources out there because different things work better for different people.
-
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.
-
Stop dealing with fractional measurements and relative percentages and switch to flex. https://developer.mozilla.org/en-US/docs/Learn/CSS/CSS_layout/Flexbox
-
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...
-
Assist with... what? What code have you written? What about it is or is not working?
-
Cannot display comments from db in custom php mvc system
requinix replied to Lesley007's topic in PHP Coding Help
Have you tried adding that template you have for the comments into the page you already have that shows the post? -
But why? If my billing and shipping addresses are the same then why do I have to type it in again?
-
Does your code also say "funciĆ³n" and "definido" and "prueba/captura"? Post your actual code.
-
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.
-
1292 Incorrect datetime value - converting to MySQL 8
requinix replied to ober's topic in MySQL Help
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. -
7.4 is the version of PHP, not the version of Windows.
-
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.
-
Exactly what does "won't allow" mean? Do you see one of your error messages? Which one?
-
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.
-
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.
-
What do you see happening and what is it that you expected to see? In detail.
-
I take it you're not familiar with that syntax? https://www.php.net/manual/en/function.echo.php
-
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.
-
Data not reaching database after arriving to php endpoint
requinix replied to ranger2022's topic in PHP Coding Help
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? -
HTML 4? mail() function? Where are you getting this from?