Jump to content

requinix

Administrators
  • Posts

    15,275
  • Joined

  • Last visited

  • Days Won

    432

Everything posted by requinix

  1. No. It will print "Array" and "[0] =>" and the filename. Think about what that might mean.
  2. Pretty sure some fact here isn't quite as you think it is. Check the browser's error console for messages. Also check the network requests to see if there's something that stands out there.
  3. What kind of "basics" are you looking for? All you need is to start VS Code, open a folder, and start writing.
  4. If the modal is powered by a jQuery plugin then you need to be using the plugin's own methods to open the modal - by which I mean something that will probably look similar to $('#modal-signin').modal('show') - not simply manually .show()ing it.
  5. requinix

    quota size

    There will very, very likely be some command or /proc stat you can execute/read within PHP to give you the information. The CGI scripts might be textual scripts, like Perl or Python. It'll take time but you could try reading through entry.cgi to find out how that's getting the information.
  6. You mean you want the SUM of the balances? Perhaps GROUPed BY the recipient?
  7. An ID means there is only one on the page, there can only ever possibly be that one on the page, and it should probably represent something specific and special. A class means you want to apply some CSS rules or Javascript processing to it. <div class="container"> <div id="page-navigation" class="left"></div> <div id="page-content" class="center"></div> <div id="page-sidebar" class="right"></div> </div> The first DIV is the one, single container used by the page for the main content. It doesn't need an ID because you don't need to do anything special to it. It does act like a generic .container. #page-navigation has links or whatever relevant to the page. It has an ID because you might want to style the contents differently. Inside the container it acts like a .left. #page-content is the content for the page. It has an ID because maybe it has some special border or background, or maybe you want to run some Javascript on what's inside. It acts like a .center. #page-sidebar has maybe ads or additional information or something like that. It has an ID because that way to can target it with Javascript to place the ads. It acts like a .right.
  8. Read the documentation for pg_fetch_result to find out what $raw is.
  9. HTML does not do wizards. Javascript does not have the concept of "wizards". jQuery does not either but there will be some jQuery-based plugin that does - presumably jQuery UI. Read the documentation for jQuery UI to see how you can use its wizard thing.
  10. The wizard steps are normally driven by Javascript. Your version where you need to do AJAX is also based on Javascript. Find a mechanism which allows you to tell the wizard to advance to a new step and use it.
  11. If the field is a date then it should be a date. Don't make it a string. But what I was trying to point out was that you were asking MySQL to interpret the timestamp 2022-01-22T20:52:00.000Z according to the format %c-%e-%Y %T, or in other words M-D-YYYY HH:MM:SS. That's not going to work.
  12. Look at the URL in your address bar. See the part at the beginning that says file://? That means you are trying to view the file like a regular file. You need to view it as a webpage. As in through XAMPP with a URL that starts with http://.
  13. Look at the query. STR_TO_DATE('2022-01-24T20:52:00.000Z' , '%c-%e-%Y %T') What will that try to do?
  14. Programming is not like cooking, where you can throw a bunch of things into a pot and get a delicious gumbo. Programming is like painting: the canvas may vary and what you're trying to draw will be different each day, but you need to work with the paints in a certain way, and if you try to throw them together then all you're going to be able to paint is "Brown Rock In Puddle of Mud". If you want red then you use red, and if you want yellow then you use yellow, and if you want some shade of orange then you mix red and yellow together in very precise, calculated, and controlled proportions. You've got a lot of things going on here and only a small fraction of them are going to be appropriate, let alone useful, to your end goal. It's complicated enough that I'm not even entirely sure what your end goal is supposed to be (other than "you want a red dot"). So let's start at the beginning - or perhaps a little bit on this side of it. You have a database, but let's pretend you already got what you need from it and now have that $b64 variable. In as technical terms as you know, what do you need to do with it? Do you need to output an <img> into your HTML that will show this image? Or do you already have the <img> and you need a script that you can reference to show the image? And I'll skip ahead a bit and ask: in the general case, are these images going to be small and simple, or potentially large and detailed? Judging by the fact that you're talking about JPEGs that are 5"x5", I'm thinking the latter. We'll come back to that later.
  15. POSTed forms a very capable of including GET parameters: all you have to do is put them in the form action's URL. The problem here is that the form action's URL does not include any GET parameters.
  16. Submit the form and look at the URL. Do you see an "id" in there? If you want the form to submit back to the same page then remove the form's action entirely. Because the default for a form without one is to submit back to the same page. And stop using PHP_SELF.
  17. Spend some time learning about PHP so that you can understand what sort of changes you will be making. // this variable is defined outside of foo() $outside = 123; function foo() { // you cannot use $outside here echo $outside; // warning: undefined variable } foo(); // if you want to use a variable inside a function then you must pass it as a function argument function bar($inside) { // you can use $inside here and it will have the same value as $outside echo $inside; // 123 } bar($outside);
  18. function dodaj($nazwa){ $link->query('INSERT INTO zakupy VALUES(null,\''.mysqli_real_escape_string($nazwa,$link).'\',\'N\');'); Variables like $link defined outside of functions are not available inside of functions. Pass $link as an argument to the function, like you're already doing with $nazwa.
  19. Fix your queries so that you don't try to include columns in the SELECT if you aren't GROUPing BY them. SELECT a, b FROM foo GROUP BY a /* bad because "b" is not being grouped by */ How you fix a query depends on what it needs to do...
  20. Sure: make sure the value stored is a time in the future instead of the current time, then modify the things that query the table for what to show so that they ignore things in the future. Exactly how you do that is going to depend a lot on how the blog is written...
  21. I use mostly PHP Debug and PHP Intelephense.
  22. If "the recommended script" is conflicting with "the dataLayer" then my first step would be to troubleshoot why.
  23. That would be a PHP source code file and line number, but the error happened on APCUIterator::current which is internal code so there is no file or line number. But errors do need to report some location, thus that.
  24. Don't hijack threads. What code have you tried so far, what has it done, and what did you expect it to do?
  25. There's no "tapping into" or "breaking into" here. If the code running on both subdomains can access the same source of session data (probably files) then they can share the same sessions. This sort of setup happens all the time. If the sessions are files then it's easier to have the sites on the same server - naturally. If the sites weren't, or were "in the cloud" or otherwise distributed, then a database would be better/easier.
×
×
  • 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.