Jump to content

requinix

Administrators
  • Posts

    15,229
  • Joined

  • Last visited

  • Days Won

    427

Everything posted by requinix

  1. Please use the Code <> button when posting code. I fixed your first post earlier and your second post just now. And for the love of everything that's holy, if you're not using a license header then don't use a license header. $username = (DBOracle::getInstance()->get_user_details1($userid)); if(!$row) Look at those two lines. Read them to yourself out loud. If you can't see the issue, step away from the computer for a while, make a sandwich or play some games, then come back and check again.
  2. That doesn't make any sense. Anyway, you skipped over the most important part of what I said: you're trying to pass $pid as a parameter but your query doesn't have a placeholder for it. That means you need to reconsider exactly what is happening around there.
  3. Why is the article number coming from the session? Shouldn't the query have a placeholder for the $pid?
  4. Try using your browser's developer console to watch the AJAX request itself. Pull it up, go to the network or whatever area, then type in the box and click away, and you should see the request go to the server and the response come back. Then take a look at it.
  5. Modify your AJAX so that it can handle an error response - perhaps by console.log-ing the response - then see if you get an error message from PHP showing where the problem is. (Spoiler: there is an error from PHP)
  6. The syntax of a for loop is for (<initialization>; <condition to check>; <action to take on each loop>) { ... } For you, The initialization would be starting the $j variable at 2017 The condition to check is that $j is greater than or equal to (since it will be counting down) $mindate The action is to decrement (--) $j
  7. So how about posting what you tried so you can find out what was wrong with it?
  8. for($j=$mindate;$j<='2017';$j++) { That's what you need to change. It's currently counting from $mindate to 2017 by adding one to $j (that's what $j++ means) each time. You want that to instead count from 2019 to $mindate by subtracting one from $j (that would be $j--) each time. When you have that working, why 2019 specifically? Is it because that was last year? Since it says 2017 now, does that mean someone forgot to update it last year to say 2018? If you want the year to be dependent on the current year then you can have PHP do that automatically instead of having to edit the script...
  9. If you want to change the values that $j gets then you need to change the code that gives values to $j. That will have been somewhere earlier in the script.
  10. What is the path to the directory where you're putting your files, and exactly how are you "starting the server"?
  11. Then the first thing you have to do is get an error message. Check your server error logs for why it's giving you a 500.
  12. Seems to be working for me: I tap the button and I get validation errors. What browser and OS? Tried other mobile devices?
  13. if ($stmt) { That will always be true.
  14. RewriteConds are important. Can't just decide to omit them for a Rule.
  15. FFS dil_bert. This is one of the most requested mod_rewrite things in existence. Do you know what I'm going to say next? I honestly don't know if you do. Google it.
  16. Is this file in some particular syntax? It looks like there's a format to it. Still don't know what "query_complaint_type_list" or "status_0" have to do with it, but the first step is probably to read the file into a PHP structure. Why bother? Just make it a .txt file and be done with it. Don't clutter up the file with stuff that doesn't belong.
  17. Here is a good place to start.
  18. Is that the actual way the contents of the file look? Because the file has a .php extension but that is not PHP code. I also don't see "query_complaint_type_list" or "status_0" anywhere in you example. Aren't those important?
  19. Okay. Here's what you need to do: You need to show us the full version of the code that does not work. Talking about the stuff displaying at the top of the table doesn't help. Showing single lines of code doesn't help. Reiterating what works and what does not work doesn't help. Make sure your code is written so that it tries to do what you want it to do, then post the whole thing so we can tell you what's wrong with it.
  20. I don't see where you output the success message.
  21. Not according to the code you posted. Either your code is wrong and gw1500se is right, or I don't know because you haven't posted your real code.
  22. What's the C++ code you're working from?
  23. Get your members by seniority and assign them to teams in a round-robin way: first 6 are leaders, second 6 are assistants, and so on.
  24. rocky@rockysMacBookPro ~ % php-fpm [21-May-2020 13:36:05] WARNING: Nothing matches the include pattern '/private/etc/php-fpm.d/*.conf' from /private/etc/php-fpm.conf at line 143. [21-May-2020 13:36:05] ERROR: failed to open error_log (/usr/var/log/php-fpm.log): No such file or directory (2) [21-May-2020 13:36:05] ERROR: failed to post process the configuration [21-May-2020 13:36:05] ERROR: FPM initialization failed Have you looked into that?
  25. Think about your logic. If $number is 101 then it <>102, right? And if $number is 102 then it <>101, right? Also, please do what the rest of the PHP community does: use the && || != operators instead of AND OR <>. The first group is what you see in programming languages. The second group is what you see in SQL. PHP is not SQL.
×
×
  • 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.