Jump to content


  • Content Count

  • Joined

  • Last visited

  • Days Won


Everything posted by ginerjm

  1. You don't understand arrays at all, do you? You can't have the same key twice. One will replace the other. Does that make sense. You should have only modified your code in the fashion that I showed you using one element as an example.
  2. Well, you can't concatenate those values into one array element. You have to make the 'value' an array of its own as you were doing before. As in: $arr['wholesale'] ["wholesale_customer"] = array( "Silvia Premium Standard Shipping (Tracking Service)", "Silvia Union Standard Shipping (Tracking Service)" ); And you would reference one of these as $arr['wholesale']['wholesale_customer'][0] or .....[1].
  3. And thinking about this some more, why not simply do a FetchAll instead of a loop and use the resulting array as your array?
  4. No. You need quotes on all string values. That means the indices (ie, 'customer') and the values. And - why are you showing a comma-separated value in each array element? What are they? OTOH - you have the idea I believe. Now you have one array that contains two sub-arrays and you will only reference one of them when dealing with a single customer/user.
  5. Since your fetch is already returning an array to you and since you are needlessly creating vars from that array only to build another array with them, why not simply push the $row array onto your final array and save a lot of code? And why the json? You are just trying to output the rows? Why not a simple echo with a print_r wrapped in a <pre></pre> pair?
  6. Take the array you already built and break it down into two separate ones. Then use a 3rd array to hold your chosen set of data from 1 of the two separate ones. That's the easy way. OTOH - if you knew more about array handling you could use a multi-dimensional array to hold the two arrays in one array and simply use the correct index to only reference the set of data in that side of the array. $arr['retail'][key] = value $arr['retail'][key] = value; $arr['wholesale'][key] = value; $arr['wholesale'][key] = value;
  7. Not quite sure but let me give you this to think about. Why not use two static arrays and choose one or the other when you first find out what kind of customer you are working with? Copy the correct static array to your "shipping" array and use that one only in your code all the time for this customer.
  8. WHAT is this? You have a tendency to NOT be very specific in your posts. You don't explain things, you don't ask questions. You simply post something and then hope forum users can figure out what you are trying to say. Please say what you want! For instance - whatever does 'NodeJS' have to do with this list of numbers? And what are the words there for? None of this is obvious to us.
  9. So - please explain what you are trying to do instead of telling us your code is incorrect. To me it looks like a typical "look-up" array where, given a key value, you can look up the literal name you wish to use.
  10. I do believe your first query has a syntax error in it also. You end the query with a space char and then add $order to it.
  11. Isn't your array faulty? You have multiple entries with the same index such as "ws_silvia_silver". Only the last one will exist once you have created this array. And why the secondary array to hold the "title" values? As for the original question, I leave that to people with experience in your plugin.
  12. Sorry can't help you. Too much spaghetti code between your business logic and your presentation logic. Shouldn't mix the two.
  13. Where is the code that handles the inputs, ie the checkbox selections, that are being submitted? That would be the place to worry about this question, so show us that code. PS - I think this line is a problem ($category['id']==$categories) You are comparing a string var to a resource. No can do. If you had php error checking on you might be getting the message.
  14. and what is the 'trouble'?? BTW - as a newbie you may not be aware but PHP is a case-sensitive language. That means that if you use a cap letter in a var name but then reference that var later on without the proper cap, you will not be referencing the same var. That can be a real problem with a long script when you can't figure out why something isn't quite right. I highly suggest that you NOT use mixed case names to avoid this problem. All lower case is so much easier to work with, IMHO. That and some underscores to break up longer var names. In your case I would use "bonus_numbers_min" and "bonus_numbers_max".
  15. Then I have no f.... idea what you want from us.
  16. I"m guessing that you want the url to provide two arguments for you. They would be referred to as $_GET['do'] and $_GET['tag'] which would yield "process" and "mysearchword" to your "search.php" script.
  17. For future reference: It is much much easier to work with a script that puts all of its php logic in one area of the script and the majority of the html and JS and CSS in another area of the script. Mixing php and html code all together when it is entirely unnecessary makes for very difficult debugging later on, as you have done here. Good luck with the current problem but think about your coding style next time you begin a script. Start with the session being turned on, then static values that need to be set for the script then handle the inputs and then do the logic that needs to be done and finally do your output of your html. Be sure to save your php results as php vars and bury them inside the html output places rather than burying php code inside your html. Of course sometimes you will have to embed html code inside php logic such as when building an html table or a dropdown list but the total output of such an operation can be saved as a single php var that you then place in the appropriate spot of the html output area at the end of the script. That makes it so much easier to read thru the php logic to debug things. In this script - I for one am not going to dig thru all of you divs and li and other tags just to find something wrong.
  18. Oops - my bad. Sorry for the confusion.
  19. Care to share? I mean - you posted a problem and then suddenly you solved it! Well - what did you do?
  20. offerwall website? send the message onto a web page? website method? What are these terms? Strange language!
  21. That's great but as I said my manual does not show it as an available function. Do a Search and you only get mysqli_fetch
  22. Which line of code is the bad one? That helps PS - My php manual does not show this function in use - mysqli_fetch_array
  23. How about: <?php if ($pt->second_page == ‘about’) echo "<meta name='robots' content='noindex'>'"; Assuming that you place this code in the correct script and in the correct place.
  24. What you are showing us is an attempt load a line of html code as php code. What was suggested was that you use php to determine when to add the html line. Something like: (in php mode) if $pagename == 'profilerpagename.php' echo "<meta name="tobots" content="noindex">"; These lines need to be added near where your head section is being out and of course only in the profiler page's coding.
  25. "can only be edited in php"? Whatever does that mean?
  • 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.