Jump to content

requinix

Administrators
  • Posts

    15,227
  • Joined

  • Last visited

  • Days Won

    427

Everything posted by requinix

  1. E: The repository 'http://ppa.launchpad.net/indicator-brightness/ppa/ubuntu focal Release' does not have a Release file. N: Updating from such a repository can't be done securely, and is therefore disabled by default. N: See apt-secure(8) manpage for repository creation and user configuration details. Did you see that part? Because I just did what it said to do and I think I can see the solution right in front of me.
  2. Can't you just put the old files back? I mean, if your host "decided" to delete your files, that's a really bad thing and you ought to move to another host who won't, you know, delete your stuff.
  3. The current "the IDE everyone is using" is VS Code. It's a multi-purpose IDE which means you install extensions to do whatever you want. And for better or worse, there are a lot of extensions. For PHP development specifically, PhpStorm is basically the reigning champion.
  4. Do you still feel the same way if I tell you that MySQL caches queries in memory? That if you prepare a statement one time, preparing it again later will be easier? That to an extent, queries themselves are cached too? In other words, that kind of performance isn't something you need to worry about right now, and the level of performance you should care more about is of the queries themselves.
  5. AMPPS or WAMP or XAMPP or whatever, they're all basically the same thing. They're convenient for primarily Windows and Mac people who don't want to have to set up a local environment manually the "normal" way. Go ahead and use it if you like it. Just make sure you have a similar web server (eg, Apache or nginx) and about the same versions of PHP and MySQL as your live site. Would suck to find out your code you wrote for PHP 8 locally doesn't work as well on a PHP 7 server, right?
  6. Oh. Also, when it comes to new features, if you're not sure where in the manual you have to look to find more information about them, try the RFC list. https://wiki.php.net/rfc Constructor Property Promotion's mentions the different ways it could handle attributes, and that it opts for making attributes on arguments apply both to the arguments and the promoted properties.
  7. It would be easier to do this with Javascript, actually, by creating an <a> with the SVG data plus a special "download" attribute. Example: <svg id="svg">...</svg> <div id="download" class="container"></div> <script> (function() { var a = document.createElement("a"); a.href = "data:image/svg;base64," + btoa(document.getElementById("svg").outerHTML); a.download = "segment.svg"; document.getElementById("download").appendChild(a); })(); </script>
  8. requinix

    Video script

    There's a lot here that can be involved so you'll need to do some learning on your own. The main things to learn about are: the <video> element and the basics about how HTML and CSS work together. Can you create a page that has just the video in it and playable?
  9. Once you send that information to my browser, I can screw around with it however I want. It may have started off as data from your database, but it's not in your database anymore. It's in an HTML form. What's redundant is the fact that your receiving page is going to have to look up the ID in the database anyways, which is the same place the category name is being stored. You are looking up the ID in the database, right? How else would you know that the ID you're receiving in the form is valid? It sounds like you might not be doing that. Exactly: the price is not something that should be in the form, and when you want it, you look up the price in your database according to the ID. Because putting it into the form means someone could go change the value however they see fit. Actually you're trying to do the opposite: put something in the form and then not look it up in the database later.
  10. Promoted properties are also arguments to the constructor. Your constructor has no arguments. The rest isn't important.
  11. When in doubt, a good first step would be to check if the online documentation has anything to say on the subject. In this case, it does.
  12. requinix

    Video script

    Fortunately your question has nothing to do with PHP, which is why the thread is now located in the HTML forum. It is fairly straightforward to use HTML to (1) put the video inside some markup container and (2) put an image in that container that will overlap on top of the video. Try that. If you have problems, post the HTML you've written and perhaps even a screenshot. Bonus points for using something like jsfiddle.net that will let you test what you need to do in a way that you can share it with other people.
  13. So you'd be cool with me going into the page (which is in my browser so I can do whatever the hell I want) and change the value of the name only to be anything I wanted? Let's try another example. You're making a checkout page for some online shopping thing. You put into the form the product ID and quantity, because obviously you need to know that. You also tell me the product price, because obviously I need to know that. Do you put the product price into the form as well?
  14. LEFT JOIN users LEFT JOIN timesheets ON st.time_id ON users.user_id = timesheets.timesheet_id Want to give that another shot?
  15. Setting POSTFIELDS to an array means cURL will encode your data in the "multipart" format. Apparently FindByBVN2 does not like that. If you're supposed to send JSON data then you have to send JSON data.
  16. Either you or MAMP would have set up that user and its password. I think that information is available somewhere in phpMyAdmin. Try logging into phpMyAdmin with those credentials and seeing what happens.
  17. That would be due to the % 24 you have in the $hours code. There is no error message "undefined array key". Do you mean "undefined offset"? If it says that the undefined offset was $mondiff then that means somewhere, presumably on the line of the file that was identified by the error message, something that looks like $variable['$mondiff'] If you meant "undefined variable" then that would be surprising because the only two places in the code you posted that attempt to use that variable do so by expecting the variable is an object and calling a method on it - something that would not simply report "undefined variable" but instead cause a fatal error/exception about attempting to call a method on a non-object.
  18. PHP won't be doing any weird things like returning from copy() when it's only partially done, so don't go chasing those white rabbits. It's likely to be a filesystem issue. You talk about copying files between servers but presumably you mean that there's an NFS mount (or similar) on the local machine that is hosted by the remote machine? Could there be syncing problems? Have you tried reproducing this problem without PHP? Copying files yourself from a shell, or even another language (eg, Python)?
  19. Is MySQL running? On port 8889? Is the username and password correct? Does the database exist? Does the user have permission to access it? Did you look at the exception in $e to see if that might have useful information?
  20. 9am to 5pm minus one hour of break = 7 hours. Great. So what was that code?
  21. What exact inputs did you give for the various fields? By... writing code that says "if the field is empty then don't do stuff"?
  22. Is it actually causing you problems? I mean real problems? Because JSON allows for escaped slashes like that.
  23. I don't know where the textboxes are, but that might not matter. The simplest method to make this work would be to save all the rows by using a loop to find all the rows and update each one individually. That's okay if you don't have many rows. If you do have many rows then you'll have to make some more significant changes. The first one would be making modify_records.php able to update multiple records at once...
  24. Okay. What code have you written so far? What have you tried changing to make it work with one save button for them all?
×
×
  • 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.