Jump to content

ginerjm

Members
  • Posts

    6,906
  • Joined

  • Last visited

  • Days Won

    99

Everything posted by ginerjm

  1. They have ajax manuals? google a good example for an ajax call. Or use jquery.
  2. I'm sure it would be do-able. A Json array in the js that you manipulate and then pass back to the server with the Done button where it gets analyzed. Haven't done it myself but it's doable. An ajax routine might be easier. The arrow click calls a js function that obtains the selected list item (value/text?) and makes the call to the server with that item's info and the direction to move it (up/down,+/-). The server makes the change in the db and passes back the complete new list which the js code then replaces on the web page. That would be simplest IF you know how to setup the ajax call.
  3. First you have to decide if you want to have an interaction with the server when you click the arrows. Is the change in the sequence meant to be temporary, ie, just visual, and not permanent as in having to do a db update to alter the sequence for future builds? Just visual would be handled by JS code without the server interface. The latter option would either require a call to the server to effect the db update and the re-sending of the page to see the change. Or an ajax call, but that's a whole nother subject.
  4. He needs to give up on programming. Maybe get a McJob?
  5. When you refer to a "html file" what exactly do you mean? Is it a file with a name ending in .html? Or is it a file that only has HTML code in it? Either way - unless you have configured your server to parse HTML extensions no code in that file can "call" anything.
  6. How about narrowing it down and just show the 10 lines before and after the problem line? PS - why do you expect the forum to solve a problem that you didn't write?
  7. There are two other main interfaces that are part of PHP. The mysqlI one and PDO. Many people prefer PDO which has a small learning curve but is easy once you've used it a couple fo times, IMHO. As told, the MySQL interface is so old that PHP has stopped supporting it since php 7. Use it at your own risk because once your host moves to that level your code will no longer work.
  8. Is this a jquery question? If so, you might want to try a different forum. If it is a php question, kindly post the PHP code you are describing.
  9. You need to look at your code. You move the fetched array into another array. And Repeat. Why? If you want to output the results, then output them instead of just copying them to the same array over and over and over again...
  10. And don't ever post REAL credentials on the internet! Plus - why use an array when you have the values handy?
  11. Normally I would do this with JS but with your current framework not sure if that would work for you.
  12. Code Please! I doubt that your problem title has anything to do with the code problem you wrote below it.
  13. I do believe that the $statement var is Created by the prepare call. Therefore you can't do the bind beforehand since $statement does not exist yet. The manual examples would show you that.
  14. Could you post the actual line that is giving you this error to help us out? PS - the session warning error is telling you that you did a session_start in a second spot when you don't need one. Do it at the top of the first script/file to gain control and nowhere else.
  15. Sorry. Did you ask a question since Jacques told you what to use? PS - STOP USING THE @ CHARACTER IN YOUR CODE!
  16. Is the ID a number or a string? Be sure you are comparing correctly.
  17. First - there is no m-2-m table. A table is a table. TWO tables can have a m-2-m relationship, but not just one. So - what are you really talking about?
  18. And again - you want this in a function? It s/b passed in as part of the parms. BTW - you want to use an include statement for a .png file? Makes no sense.
  19. If you say so....
  20. So - you have a value. You want to create another consistent value from it? Assuming that they are all going to be jpg files and that they are all in the current folder then don't you just want to do this: Assuming that your query produced $results containing a field named 'number': $output_html = ''; while ($row = $results->fetch()) { $srcname = $row['number'] . '.jpg'; $alt = $row['number']; $output_html .= "<img src='$srcname' alt='$alt'>"; Now echo out $output_html where you want it. I'll let you fit this into your scheme.
  21. I can't imagine a real-world example of using an html table to do this. Should someone really need a tree I think it would be better accomplished using CSS instead of that. For an instructor to be teaching you to do it this way is a sign he is past his time/prime.
  22. What a mess of code. And why do you not have a tr tag to start your first set of outputs? So - what kind of a table structure is this?
  23. Hah!! Never even looked at his query. Good point!
×
×
  • 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.