Jump to content

requinix

Administrators
  • Posts

    15,292
  • Joined

  • Last visited

  • Days Won

    436

Everything posted by requinix

  1. var dee = result; var chosen = document.getElementById(dee).checked; Assuming "result" is a proper variable, that code is correct. Therefore //other code that produces result = XYZ4; this isn't. What is this code?
  2. 405 means you used the wrong method, as in GET and POST, for what the page is supposed to use. You have to match exactly what the browser did.
  3. Hopefully won't be necessary. Give it a shot. Watch the HTTP requests being made and the responses returned. Good news is that since it's Javascript a lot of things will probably be JSON instead of HTML you'll have to parse. Then repeat what you see with cURL.
  4. Given that it's apparently Javascript now, you're going to have to use your browser to watch what happens when you perform the assorted actions you need to automate. Going to be pretty much impossible to tell you in more detail since it's all behind a login gate.
  5. But something is trying to use GET. You do not support it, which is why there is an error, but something is trying. The error message. How did you get it to happen? What did you do to see it?
  6. You're going to have to do some troubleshooting. Find out what is causing a GET request against /test2, then we can make it stop doing that.
  7. An alternative is to use a similar approach (of scanning the table for existing records) but at the time of the vote submission to prevent another vote from being added if there are already 10 from that user.
  8. Apparently something is trying to hit /test2 using GET instead of POST. Is it from the form? Is there any kind of Javascript involved? Does the form you posted, which clearly states it does use POST, actually have anything to do with the issue?
  9. You entered "j" and it's listing records with user containing "j". So I don't see what's wrong with that. Are you talking about getting all those duplicates? It's because you're joining the login and dados_user tables together without telling MySQL how to join them together. You need a query that looks like SELECT login.user, dados_user.nome_proprio FROM login JOIN dados_user ON login.??? = dados_user.??? WHERE login.user LIKE '%$procura%' AND login.eliminado = 0
  10. Can you write code that will take one file and perform the adjustments you want? What is that code?
  11. You check if the value "is set". Being empty or being zero counts as "set". If you want to check that the value is >0 then try doing exactly that. It is very much possible. You're misunderstanding the recommendations to use loops and otherwise change how your form processing code works.
  12. As gw1500se suggested, a loop may be helpful here, but if you only have the 5 fields then it's not a crime to use an if for each one. You have an if statement for item 5. Why not use a similar if statement for items 1-4?
  13. As far as PHP is concerned, yeah. That's how they work. It's what they do. It wouldn't make sense to put them in other files. If use statements are supported for annotations (they are) and if the parser is smart enough to grab those from the trait's definition rather than the class using the trait (apparently it is) then that means use statements for annotations work the same way as regular use statements. There is no question about "approaches". Use statements do what they do for code and also annotations. You can make use of them or not, and putting them in other files where they won't do anything is pointless. What "application"?
  14. You haven't installed Node globally.
  15. This is a "try it and find out" situation. If you've tried it and discovered that the use statements in the trait's file can be picked up by the annotation parser then there's your answer.
  16. while($rows=mysqli_fetch_array($result));
  17. It would be easier to know what the right direction is if we had a more detailed description, or perhaps even examples, of what you wanted to do. If you want to send the email always and only include in it particular values then your code there isn't right because it constructs the entire email based on that field. You would need the contents of the email and then to insert some piece(s) depending on $item5. Yeah, I think some examples would be nice.
  18. The best way to test it would be to put it on the internet and see what happens. What's wrong with reCAPTCHA? It's very good at what it does.
  19. It's not cumulative. The group talks amongst itself to arrive at one point value, with one or more members possibly increasing their ratings based on discussion, or (less commonly) others lowering theirs. https://www.google.com/search?q=scrum+point+system
  20. To be clear, procedural versus object-oriented code has absolutely nothing to do with server security. Either people can see your code and files or they cannot.
  21. Then how about changing your approach to allowing multiple uploads of the same file that will create duplicates, but giving people an easy way to (1) store documents under their account or something similar, then (2) "sharing" those documents with whatever projects. Vendors upload documents, like certificates and proofs and whatever, and then add those documents to their project. It creates a clearer understanding that there's effectively only the one document which is being shared with the end users. And, frankly, I think it models the real-world behavior better than worrying about detecting identical files.
  22. Do the users know that these files are unique? Because I would expect that most of the file, when someone uploads a file to a place then they'll expect it to be available at that place. Personally, I think it would be weird to search for a file that I know was uploaded 10 different times and only see one search result.
  23. Why do you care about having them both share the same bytes? Disk space is cheap, and this scheme is making stuff complicated.
  24. So there's a very specific company-name you want to do this redirect for? Why does it have to be a variable?
  25. Oh, dammit, I'm thinking about this all backwards. The odds of a collision are mostly irrelevant because they're unlikely to happen unless the files are identical. And that is going to happen. But MD5 is still fine because it's still astronomical for the hashes of two different files to match. All it does is increase the average number of files you'll have to manually compare by a negligible amount.
×
×
  • 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.