Jump to content

requinix

Administrators
  • Posts

    15,289
  • Joined

  • Last visited

  • Days Won

    436

Everything posted by requinix

  1. PHP requires that opening tags have at least one character of whitespace after them. Or be at the end of the file.
  2. Thank you for including code, but how about telling us why you're doing all this? What problem are you having? Why do you think this code is responsible?
  3. Look at what you call the element thing in the session according to the first bit of code, then look at what you call it in the second bit of code.
  4. Varies. You're venturing into the territory of frameworks like React and Angular: the tag is managed as an object in code, then rendered into the table as a row. You can meet it halfway by embedding the tags as objects separately, like {{ tags|json_encode() }} in a script. The modal code can read the data from those objects instead of pulling them from the source. (Remember to update the edited object too.) Then the problem is getting the objects to the modal, which should be easier to deal with. Otherwise you're basically stuck pulling the data from the source. Or else loading the modal through AJAX where the server can return the modal template.
  5. Well you're going to need to take a crash course in learning your site's PHP and server configuration. Because if you attempt this upgrade and aren't aware of something important the site needs, you'll crash it. You need to know what configuration changes have been made from the base and what extensions are enabled.
  6. If you're the admin then hopefully you remember when you first set up PHP, right?
  7. You should contact your site administrator to do this.
  8. Is that the question? How to make a particular one the default? Add the "selected" attribute to the default <option>. Which you have to determine on your own. <option value='(role_id)' selected>(role_name)</option>
  9. Windows? Go to windows.php.net and read the instructions on the left.
  10. Unfortunately not. We used to have that ability, but the current version of the forum software doesn't offer it anymore. Replying that you have an answer is fine.
  11. The text file is probably not the right way to go with this. I'm looking for actual markup right now. What is it for the images, and for the modal?
  12. They're quite a bit different, but not as drastically different as some past versions were. This is a great time to set up a local environment for yourself to develop and test with. It would make doing this upgrade much easier for you.
  13. Okay. Then see the link in my first reply.
  14. https://3v4l.org/040Pe YOUR CODE WORKS FINE. WHAT IS THE PROBLEM?
  15. You want to do something. Your code already does it. What is the problem?
  16. Okay. Are you saying that code doesn't do it? Because it looks like it would do it. PS: If you want to remove a node, remove the node.
  17. It can't be both... It could be that some data was JSON-encoded, then put into a urlencoded request, like key=value&json=%7B%22a%22%3A%22b%22%7D but that would be silly.
  18. Where you store the data is up to you. But what about the images? Where are those coming from? Are they just written directly into the page? Wherever those images are coming from, that's where the headings, text, and video (URLs?) should be too. For the modal, do you already have the markup for it? What is it?
  19. That's JSON. Do you not know what you're doing?
  20. You don't. The data will be in $_POST. You know, like it normally is.
  21. To explain, the thing about converting to cents is because integers are precise while floating-point numbers (non-integers) are not precise. And when it comes to currency, being precise is very important. What DECIMAL does is give you something that looks like a non-integer, except it's precise. In exchange for the precision, you have to tell the database exactly how precise you want and you won't be able to store anything smaller. But that's perfectly fine for you because you don't care about anything more than two decimal places for cents.
  22. I don't put comments on classes. They tend to be somewhat self-explanatory just by reading the (namespace and) name alone. Unless there's something particular complicated about them... but most of the time any complexity is with what that happens inside a method. But definitely put comments on the methods.
  23. Looking for help with what part, exactly? Are you not sure what the SELECT query should be? Having problems integrating it into the code and displaying the results?
×
×
  • 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.