Jump to content

ginerjm

Members
  • Posts

    6,906
  • Joined

  • Last visited

  • Days Won

    99

Everything posted by ginerjm

  1. Look very closely at what you typed for your query call. What is $sql?
  2. Show us the code that is giving you this message. You should always do this. Mysqli is not (yet) deprecated. Mysql is deprecated and has been for a few years.
  3. Dangling can refer to perhaps a thread hanging off of a new shirt or a strand of hair hanging on your forehead.
  4. If you look at the error message and examine the part of the query statement that it points at you will see what a 'dangling comma' is.
  5. You have a dangling comma
  6. The where 1 is simply selecting all records. Not needed but I tend to include it anyway. My bad on the sequence of clauses. Tend to do that too.
  7. I think your query should look like this: select username, sum(donation_amt) as total_donated from tablename where 1 order by total_donated desc group by username
  8. You could make the opening page check for the screen width (JS) of the device making the call and re-direct the process to the page you want if the size is < 800px or whatever size you want to check for.
  9. This forum is to help aspiring coders with their projects. If you want someone to do the coding, aka writing, perhaps you want to move to another forum that focuses on doing just that thing. OTOH if you have some code that you have written and need help with that, then show us that code by posting it here and telling us what is not working.
  10. I think you have to realize that sessions always expire when the client shuts down the browser. Cookies and dbs last as long as you want them to. Use the latter to feed the session when the authentication process occurs and you'll be fine until you end your activity once again.
  11. I noticed that too but thought he was actually trying to put all of the code there in as the href attbribute. As I said then it was some pretty messy html.
  12. If you have actual code it would be better if you posted that instead of the black blob on my screen now. And just what is "inded"?
  13. What does this mean? I really don't know what you are trying to tell me/us.
  14. I have no idea what your question is. I do see some html code that is very difficult to interpret.
  15. HOw about posting some code that we can read and play with should we need to? Images are not really appreciated.
  16. Trying to read through your horrible English I would be hesitant to even try to explain any other language to you. Sorry, but if you think your paragraph makes sense you will have nothing but trouble in your programming career. Good luck.
  17. The code just prior to those lines needs to check if the subcategories var is an array, or even if it is 'set'. If it is not then you need to code around that logic to avoid the invalid testing that's happening. Actually - upon further review - do a test of the var prior to the use of count and if it is not set add this line: if (!isset($subcategories)) $subcategories = array(); Now you have a countable variable that should solve both errors.
  18. I make it a habit to stay in PHP mode all the time. To avoid switching in and out when I am coding in JS or HTML I use the heredocs operation which makes for very easy coding and allows me to easily embed php vars in the html code without concern. Read up on it. Same thing with a db connection - no need to close it down since php will do the clean up when you exit the script.
  19. Where did you read the part about "attaching the array to a function"? Interesting terminology if you ask me. Have you tried to read up on How to Use Functions to see how this is done? Would be a great learning moment for you I'm sure.
  20. 1 - THIS IS A 12+ YEARS OLD POST. 2 - The MYSQL database interface was removed from PHP several years ago. Try switching to MySQLI or go to PDO which is much easier to use IMO. STOP POSTING TO THIS TOPIC!!!
  21. Do you know that (unlike empty text boxes) un-checked checkboxes do not get returned in the POST array? That could be the problem
  22. Good question. Here's what I did: $thenumber = 12; echo "$thenumber with float: ".number_format((float)$thenumber, 2, '.', '').'<br>'; echo "$thenumber without float: ".number_format($thenumber, 2, '.', '').'<br>'; $thenumber = 5.2; echo "$thenumber with float: ".number_format((float)$thenumber, 2, '.', '').'<br>'; echo "$thenumber without float: ".number_format($thenumber, 2, '.', '').'<br>'; Results: 12 with float: 12.00 12 without float: 12.00 5.2 with float: 5.20 5.2 without float: 5.20 Easy answer. Doesn't seem to matter.
  23. And your question is? Where is this 'login'? And how is this related to a PHP forum other than your rewrite rules? Maybe you want to show us the index page that is calling the login function?
  24. Since nobody is taking an interest in this post how about you clean it up a bit/a lot. Organize your code. Do not mix your JS, PHP & HTML together. Structure your script to do the necessary input receiving and validating and processing it with your php. Then create your output with the page being built in the usual way of an HTML page with the js code in the head section and the html in the body section. Do not mix them. Add your php vars that you may have built in the beginning (the php code) in the appropriate place(s) of your html code. BTW - what made you post this Telegraph here in a php forum? If all it is a call to some other app why do you need our help to call something and receive an answer and process the returned info/data and create the desired view of that data? What is Telegraph?
×
×
  • 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.