Jump to content

gw1500se

Members
  • Posts

    1,041
  • Joined

  • Last visited

  • Days Won

    17

Everything posted by gw1500se

  1. Good catch. I missed that subtlety.
  2. You need to change your loop from a while to a for. for(i=0; i<$rowCountUpdate; i++) What seems strange to me is that you are not changing your query parameters on each pass. It looks like you are always updating the same row thus the infinite loop.
  3. Your syntax was just messed up. You can see how much simpler Barand's code is. There are a couple of ways to do the same thing but none are complicated. When you find yourself adding too many quotes and other symbols you are probably on the wrong track. PHP recognizes anything that starts with $ as a variable and does substitution. If you need to have a string that starts with $ and do not want substitution then you need to escape (\) the $, thus \$whatever.
  4. You are not passing $Connection to the function so it is undefined. If you had errors turned on you would have seen that.
  5. https://www.php.net/manual/en/class.domnodelist.php
  6. First, please use the code icon (<>) and select PHP for your code. The formatter makes it much easier to read. As for your question, PHP has a function to handle json called json_decode. It will create and associative array so you can access whatever you need easily.
  7. Excuse me but "all of the experts?" Bull$hit. Requinix IS an expert as well as Kicken. You would be foolish not to heed their advice and it sounds like you will be foolish.
  8. Why in the world would you store it that way in the first place? Thought it may work now, down the road who knows what kind of problems this will present. Now is the time to fix the schema so it makes sense.
  9. You can't just copy code and necessarily expect it to work. You need to understand the code presented and then implement your own.
  10. Are you logging in using the same user (root)? Also is the PHP script running on the same server as MySQL (localhost)?
  11. Perhaps not so obvious. The error message indicates that the database it is trying to open is 'lr'. If the global was returning something different, it would not show up that way in the error message. That database must not exist at least in the way it is being referenced. Again a 'show databases' would verify that.
  12. The error is pretty obvious. There is no database named 'Ir' or the parameter Config::get (whatever that is) is not doing what you think. You can see what databases exist by opening a MySQL connection from the command line and entering 'show databases'.
  13. I think you are confusing what PHP is. It is server side only. PHP does not execute on the client side (user machine). Client side code is javascript. There are some javascript port scan scripts around, just search for javascript port scanner.
  14. This is really a MySQL question. Your stored procedure has no IN/OUT statements. Perhaps this will help. Search engines are your friend.
  15. I don't understand your code at all. You're putting the rows generation outside of the loop so only 1 row gets created. Plus you are putting your form inside the table. The HTML just doesn't make sense. I suggest you read up on how to create tables in HTML. As for your 2nd question, you create a script that does the connection as a function call and include functions that do your standard queries. Then add that script with require and call those functions from your main script.
  16. There is your answer. Either you are not adding a value for email in your insert or there is a problem with your schema.
  17. No, you are the programmer. If you want someone to write the program for you there is a form to hire someone.
  18. Obviously the query is failing. You need to echo mysqli_error to determine why.
  19. You need to figure out why $error is not being set. As a workaround initialize $error to something at the beginning of your code. In any case that has nothing to do with your database not being updated. Which problem are you trying to solve?
  20. I suggest you learn to read. I already told you what is wrong. Did you bother to look at the formatted code you posted and the colors? It is very obvious if you just look. That is the point of the the formatter.
  21. Because it is not executing due to the syntax errors.
  22. I edited my previous post after you replied. Please read.
  23. ??? Now that you have used the code icon you can see there are syntax errors. Your <?PHP and ?> tags are messed up/missing. There are other glaring flaws in your code. Never ever put user data directly into a database. You are wide open to injection attacks. Use prepared statements and validate the data. I am guessing that you are not validating anything on the web page before submitting it and I see nothing that validates your data in your PHP script.
  24. What about my questions?
×
×
  • 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.