Jump to content

gw1500se

Members
  • Posts

    1,041
  • Joined

  • Last visited

  • Days Won

    17

Everything posted by gw1500se

  1. What does 'single' do and return?
  2. I don't see where that variable is set anywhere.
  3. There has to be more to Loader.php than that. What you posted won't even compile.
  4. You need to post Loader.php and point out which line is 346.
  5. This is a PHP programming forum. You post the code causing the error message and we can help figure out what is wrong with the code. Is the error caused by your code or by the web site upload process? If your code, post it. Be sure to use the code icon (<>) and specify PHP.
  6. Have you tried InfinityFree support? This does not look like a PHP programming problem to me.
  7. For Linux use the LPR printer class.
  8. You are not saving then using the statement object returned by prepare. RTFM
  9. Only true if the column of the where clause does not exist. Unless, of course, you don't have privileges. This should get you started.
  10. When I said leave the action off I meant that literally. Don't put that in at all but I don't think that is the real problem. Start debugging by putting print statements after each mysqli to follow your logic so you can tell where it is failing. If you are getting a blank page then make sure there is no logic path where there is no output. Also check the page source to see if there is anything there that the browser is not displaying.
  11. Don't feel bad, neither did I.
  12. Assuming this is all one script, just leave the action parameter off.
  13. The column may exist but that does not mean anything was returned by the query. DO NOT use * in the query. Only specify those columns you actually need to use. Add the following before that line so you can see what is being returned: echo "<pre>"; print_r($row); echo "</pre>";
  14. What is the line causing the error? Why did you not post the entire error message?
  15. Your action parameter is just doing an echo. It is not calling the script.
  16. You need to be using try/catch with these calls to handle and identify errors. I'm guessing the open is failing because the path to the file is wrong.
  17. Not enough information. Where and how was the session variable set? Is there a session_start call at the beginning of this script? There may be other issues, unrelated, with your query as well. You are not using prepared statements which may be OK as long as ':id' is not coming from a web page. Also it is bad practice to use * in a query. Specify only those columns you intend to actually use.
  18. Hard to say without knowing how you are managing your logins. However, you could change your login script to check for the user's password or a superuser password. You have to be careful how you do the latter and what you us as a superuser password to minimize the risk of being hacked.
  19. Thanks for confirming my theory.
  20. I have the following javascript that I am trying to reverse engineer: function set_sw(row) { var i; var ofs = ofs_sr + row * 6; var sel_var = document.forms[0].elements[ofs + 5]; // Use the sw_id table to get the ID and the user-friendly name sel_var.options[0] = new Option("None", "None", false); for (i = 0; i < sw_id.length; i += 2) { sel_var.options[i/2+1]=new Option(sw_id[i+1], sw_id[i], false); } // Set the option if (sel[row * 2 + 1] == "") { sel_var.selectedIndex = 0; return; } for (i = 0; i < sw_id.length; i += 2) { if (sel[row * 2 + 1] == sw_id[i]) { sel_var.selectedIndex = i/2 + 1; return; } } } My question is how the array 'sel' is being used? That array appears to be used as pairs of values. var sel = [0,"170000001A5EA905",0,"910000001A7F2A05"]; var sw_id = ["910000001A7F2A05","910000001A7F2A05","170000001A5EA905","Test"]; I am trying to understand where/how the first element of each pair is being used. It appears to me that it is not used but it seems strange then that it is there. I'm hoping some new eyes can help. Can someone tell me if and where it is being used in that script? TIA.
  21. if( strtotime($database_date) <= strtotime('now') ) { ... Make it just < if you want to exclude today as well.
  22. Not there either as far as I can see. However, note that is appears to be using the deprecated (for more than a decade) mysql extensions which leaves you wide open to injection attacks. You need to take down this page immediately and switch to PDO or at least mysqli.
  23. Nope. That just contains the login info. The code that restricts access is going to be an 'if' block that tests the login info.
  24. Yes, you can program PHP to do anything with a database that you can do manually. However, I suspect that is not really what you are asking. Be more specific about what you want to accomplish. Creating databases and tables from PHP requires privileges. You are getting into an area where you need to be extremely careful security-wise to prevent unintended consequences.
×
×
  • 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.