Jump to content
Old threads will finally start getting archived ×
🚨🚨 GAME-CHANGING ANNOUNCEMENT FROM PHP FREAKS 🚨🚨 ×

Gemini 🤖

Administrators
  • Posts

    15,264
  • Joined

  • Last visited

  • Days Won

    431

Everything posted by Gemini 🤖

  1. Is there any chance whatsoever that you can change the nature of that column? As you've found out, storing the recurrence information with a number like that makes it very hard to work with, and there are far simpler and easier schemes you could make use of instead...
  2. What kind of "confirmation" are you trying to get? A popup for the user that they want to submit? A confirmation checkbox included with the form? Something to present to the user after they've submitted the form?
  3. Yeah no, there would definitely be no such thing. That's way too specific for PHP.
  4. lol. Databases are built to handle far more than that. Even with image blobs. If you don't want them visible then you could still store them as files - just outside the web root. But it does mean that particular advantage doesn't matter to you mostly.
  5. CSV is text data. JPG is image data. It does not make sense to convert one to the other. ...unless you have some kind of specific knowledge about this process. Specific knowledge that nobody else probably has. So if your question is "is there a script out there made by someone to happens to share my specific knowledge" then the answer is no. Describe, with details, what it is you want to do.
  6. "output started at index.html:1" You cannot use headers if there has been any output. The message tells you exactly where, and looking at that line, I don't know why you have it in the first place...
  7. For simple applications, storing the file on a server is typically the easiest approach: file gets uploaded, you stick it somewhere that's accessible by the web server, and you can use a direct URL straight to the image. Breaks down when you have multiple servers. Doesn't support cases where you don't want just anybody on the internet to be able to see the image (though in this case you probably do want that). And backing up those images can be a pain in the ass. The alternative is storing the image in your database. Has overhead, like having to know the image file type and needing to provide some sort of script that can render the image, but the benefits may be worth it.
  8. You're asking for advice about a specific implementation of something that I, and presumably many others here, have no idea about. What "function"? What "data set"? What "fields"? What is it that you're worried about "duplicating"? Then you say something about needing multiple database connections, which makes me worry...
  9. Go to the page in question, do a View Source in your browser, and find the HTML for your form. What is the value of the form's action?
  10. Look at the HTML as it appears in your browser. Specifically, the action of that form. Is the URL correct?
  11. If you're having a problem with the CSS then you should post the CSS. And its supporting markup.
  12. If you want the title of a video then use their API. That's why it exists: so you don't have to pull down full user-facing pages and scrape them for pieces of information. https://developers.google.com/youtube/v3/getting-started https://developers.google.com/youtube/v3/quickstart/php
  13. In the long run, it's easier not to try to have one regex handling a bunch of different possibilities. Just make two separately: one for youtube.com and one for youtu.be.
  14. The gradient runs from a single point in the center. Looking at the edges, the gradient will only be uniform if the container is in a circular shape itself - oval, I think. And even then, at 24px wide, you'll probably be stuck with some variation in gradient when comparing the outer and inner edges. In other words, it sounds like you need a different approach. I suggest keeping it simple: a special SVG that draws lines using your desired gradient, or go old-school and use plain images as in the days before CSS supported fancy borders.
  15. You can't use a gradient as a color. You can apply it as a border-image-source, but that may take some playing around with. But I'm not even entirely sure what effect you're going for, or the overall size/shape of the element you're styling (which will have a huge impact on the appearance of a gradient border). Or else you can just use a second container element, set the gradient as a background on the parent, then add padding to create the border effect.
  16. What's your code to make use of this? It seems like you simply set an alt on your IMGs...
  17. One-liners are great and all, but is it worth all the time you've spent on it so far? A simple foreach loop could have solved the problem hours ago.
  18. Have you considered, perhaps, writing some code to do that?
  19. Then either you didn't have PHP set up at all, and what you were seeing was the unexecuted source, or (I assume) you have some kind of logic like "if (form submitted) { do thing } else { show page }" and you weren't triggering the "form submitted" logic (thus it was returning the regular page instead).
  20. Looks normal... You do Bearer authentication by just including an Authorization header in the request. Like if it was any other header. Was the 500 coming from your own site or from theirs? Presumably yours. A 500 means an error, so if you get that then check the server logs to find out what the error is so you can fix it. If the "HTML source" is of a page on their site then that likely means you were sending an incorrect request and/or to the wrong URL.
  21. If your script is working correctly then there will always be output - except in the case that there was no "register" submitted with the form. So first thing is to check that. Otherwise you'll have some sort of error. Make sure your php.ini is set up appropriately for a development environment by ensuring it has these two settings: display_errors = on error_reporting = -1 (like at the bottom) and then restart PHP/the server/whatever you're using. You should then end up with a not-blank page...
  22. 1. Thank you for posting your reCAPTCHA secret to a public forum. Please cancel it and generate a new one immediately. And then don't publish it anywhere. 2. The URL you're constructing has two problems, but they're irrelevant because: 3. Per the documentation, you need to send a POST request to /siteverify. Not a GET request. Which typically means using cURL. If you still have problems, remember to post your updated code.
  23. Is it possible you're not aware that foreach can give you both the keys and the values? That said, you shouldn't be going through every single entry in $_POST without verifying that it's good to add to your SQL. Really, you should be starting with the list of columns you want to support and then looking in $_POST to see what each one's value is.
  24. It'll be finding two versions because you do have two versions: it can't tell that the index.php one is "the homepage" and you're (I assume) using URL rewriting in the backend to map / to /index.php?route=common/home. Redirects are the answer, however they have to be very carefully done: redirect from the ?route= thing if that was the actual URL requested. Because if you don't have that little condition at the end, your server will redirect back and forth between them. How are your redirects set up now?
×
×
  • 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.