Jump to content

gw1500se

Members
  • Posts

    1,033
  • Joined

  • Last visited

  • Days Won

    17

Everything posted by gw1500se

  1. What did you try? What did not work or what error message did you get? Its impossible to help you if you don't show us your code.
  2. This is what you need.
  3. That result is parsable but I suspect that is not really your question. Are you asking why it is returning false? If so that is a function of the SOAP request not a parsing issue. You need to clarify what you are doing/asking.
  4. First, please use the code icon (<>) for your code and specify PHP. As for your specific problem, you are not checking for errors. Make sure you use error_reporting(E_ALL); at the beginning of the script to debug. You probably need to use a try/catch for your production version to handle errors.
  5. You need to echo $visitsneeded and $read to see what they really are.
  6. And the other (5609) apparently was visited enough.
  7. How do you know it is not going to the next value? You don't echo anything if there is a match.
  8. Yes but the order may not be what you expect. Do the following after the first loop to debug it echo "<pre>"; print_r($rifdid); echo "</pre>" Then echo $key just before the 'if': I am guessing the order is not what you expect so you may need to use the 2nd 'if' statement.
  9. Use an array for $firdid In the first loop: i=0; foreach(findCustomAlerts($customerid) as $key=>$value){ echo "ID of cat : ".$rifdid[$i++] = $value['Catid']."<br>"; Then use that in the other loop: i=0; foreach($rfid as $key=> $read){ if($key ==$rifdid[$i++] && $read < $visitsneeded) { This assumes $value will result in $rifdid being in the same order as $rfid. If it is not then you will need to search the array to see if that key is in it. See array_search. if(array_search($key,$rifdid) && $read < $visitsneeded) {
  10. First please use the code icon (<>) for you code and specify PHP. The formatter makes your code much easier to read. The problem, I believe, is $rifdid. Notice that you only set that variable in the first foreach loop. So when you use it in the if block, it will always have the same value. That value is whatever it was set to on the last pass of the first foreach loop. It seems unlikely that is what you really want.
  11. '$checkboxvalue' will never be 'empty'. It is a boolean value. If you want to know if none of the boxes are checked then use '!$checkboxvalue' in the 'if' statement.
  12. Probably a waste of time. If users with those IPs use a VPN you won't know where they are coming from anyway. If you properly harden your server and pages you don't have to worry much about hackers. If you want to keep certain users off your web site then use a login page and vet the user before permitting access.
  13. Since you have multiple queries, you don't indicate what 'it' is. Which query is returning the bogus data? As an aside you should not use '*' in a select. List only those columns you actually intend to use.
  14. Add this before the 'foreach' to make sure it does what you expect. echo "<pre>"; print_r(range( 0, $datediff )); echo "</pre>"; The errors are likely related. Which lines are 661 and 670?
  15. Do you mean myPHPadmin for MySQL? What is wrong with the standard one?
  16. Perhaps the OP is confusing server side (PHP) stateless operation vs client side (javascript) operation.
  17. I'm not following what you want to do. You say you want the page to reload without clicking the submit button. That is what it is doing which makes no sense. There must be some condition, you did not explain, that will cause a reload without the submit button.
  18. You can use json_encode to do the conversion. It would be easier to restructure your array so it can be json encoded.
  19. No, you should change the sudoers file to allow user apache to run that command. However, before you get yourself in trouble, please explain why you need web users to run restricted commands. Perhaps we can come up with a safer alternative.
  20. While you are playing with fire giving users access to a root command, the sudoers file needs the user running the script. It is probably 'apache'.
  21. What does "doesn't seem to work" mean?
  22. $_SESSION data is stored on the server. If you run 'phpinfo()' and look for the variable 'session.save_path' you can see exactly where it is. Cookies, on the other hand, are stored on the client.
  23. Cards are formatted with CSS so this is not really a PHP question. Perhaps this example is what you are looking for.
  24. Did you add a form to enclose your submit button? Show your HTML.
  25. Yes, you need to learn form handling.
×
×
  • 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.