Jump to content
#StayAtHome ×

requinix

Administrators
  • Content Count

    11,970
  • Joined

  • Last visited

  • Days Won

    253

Everything posted by requinix

  1. Can you try explaining that with a few more words? Exactly what is it supposed to do and what is it currently doing?
  2. I'm sure it was not malicious, but most people don't appreciate it when someone has homework and uses forums like ours to get the answers. Next time, please remind us that you're learning and let us know that your tutor asked you to do something. That way we can help you get to the right answer without accidentally writing all the code for you.
  3. So you got us to write the code for you. Well done. It won't happen again.
  4. Farming StackOverflow content to your forum is a really good way to piss off StackOverflow.
  5. I hope you've learned a lesson from that: don't use unattended or otherwise automatic software upgrades on production systems. Have you checked if dpkg needed to update configuration files? Hopefully it created backups of the originals - check if the changes are relevant. Anyway, the curl output looks right. Next step would be writing proper WSS headers and seeing what happens.
  6. array() can be used to create something that looks like an object (with keys) and something that looks like a list of things (no keys). The result part has two opening symbols: [ and a {. The first one is a list, the second is an object. Two symbols, two array()s. One inside the other.
  7. If the client knows it's happening, sure. Probably either explicitly mentioned in the contract, or done after the fact with some sort of agreement. Paperwork. Otherwise definitely not.
  8. It didn't do what prior to what install? It almost sounds like you're saying you had PHP working before you installed Apache and PHP... If you're using php-fpm (which you generally should be) then you need to tell Apache that it should run .php files through the service. Check the online documentation for how. If you're using mod_php then I'm pretty sure you haven't actually installed it. Beyond that, it depends what operating system you're using.
  9. $patientname = | $_POST['patientname']; Why is there a pipe in here? When you check for data, are you looking at everything in the table? Or just running a SELECT query for the data you expect to see?
  10. Not entirely clear on the workflow here. For you to count leads, you have to receive them. As in they have to go through your service. Or you have to be able to access a source of data that has leads. How does that fit into how leads work in the industry now?
  11. basename() will not return the slash. You're obsessing about it perhaps a little bit too much.
  12. I don't know what's wrong with that code because you haven't described the sort of problem you're having with it. I don't see any library that explicitly mentions supporting Code 32, but it appears to be somewhat compatible with Code 39. You may be able to get a library to read those (which are much more common), and then convert the encoded value to Code 32 using an algorithm I don't know.
  13. Okay... I said that because the code you wrote was trying to remove the extension. Either basename() or pathinfo(). Either of them in a single function call will give you the value you need. Directly. You don't have to care about the slash. Please just read the documentation for one of them.
  14. Oh, you don't want the extension either? Look at the documentation for pathinfo. The answer is there. One single function call is all it will take.
  15. From what you're describing it sounds like the problem is the way those columns are displayed. Right? Which would make it a job for CSS. Right? Depending on your CSS framework, you can show and hide things depending on screen sizes...
  16. Then it doesn't matter what Apache is running as. Because Apache is not connecting to the database. php-fpm is. Set up a php-fpm pool specifically for you to use pgAdmin with - a pool separate from your normal one. It can run as the postgres user so that it has full access to the database. Then modify your Apache/virtualhost/whatever configuration so that it runs pgAdmin URLs through this dedicated pool. Ideally you'd have this as a completely separate virtualhost... Your regular pool will be with the michael user.
  17. 1. You're still putting a variable into the query. The user_name from the session. Make that be a parameter too. 2a. Your query is searching for a ticket_id that matches your $filename. 2b. You aren't checking if the query perhaps didn't return any results. 2c. Your query is returning the ticket_id, file_name, and user_name. In that order. You are only binding the one $filename, and in the first position. Which would be the ticket_id. Please, try spending more time learning about this. If you can't see the page I linked you then find another site on the internet that talks about how to do prepared statements with mysqli.
  18. Look at the example code from that page I linked you to. Do you see the question marks in the queries? Notice how it does not put variables into the queries directly? That's what you need to do: use a question mark in every place that you want a piece of data, then use bind_param() to fill in the values. In the first bit of code you're using fetch_assoc() to get rows of data. So the values you need will be in $row. PHP isn't creating variables for you because you didn't tell it to do that. In the second bit of code you're using bind_result() which will create variables.
  19. Almost. Are you using php-fpm or mod_php?
  20. Do I have any idea how to "sending sms with whatsapp via PHP"? Yes.
  21. Not sure. Look in /var or /var/run for something appropriate. Based on the "connection refused" error message from earlier, you don't have one. I'm not sure what the "service" is. I would guess it's the name of the system service, but I'm not sure why pgAdmin would care about that. Anyway, don't worry about it for now.
  22. No problem. The thing I linked has a few examples on how to set up a prepared statement, pass values into it, run the statement, and get the results back.
  23. user_name? Not sure where you're going with that, but my point is that by putting a $_GET value directly into your query, anyone can change the query to do whatever they want. Even to make it do Bad Things. What you need are prepared statements: you build a query with the structure that you want, using placeholders for where data needs to go, then you tell MySQL what data goes in those placeholders. Prepared statements actually have a few other benefits, but they don't apply much to this particular situation.
×
×
  • 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.