Jump to content

ginerjm

Members
  • Content Count

    4,808
  • Joined

  • Last visited

  • Days Won

    63

Everything posted by ginerjm

  1. 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.
  2. Sorry can't help you. Too much spaghetti code between your business logic and your presentation logic. Shouldn't mix the two.
  3. 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.
  4. 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".
  5. Then I have no f.... idea what you want from us.
  6. 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.
  7. 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.
  8. Oops - my bad. Sorry for the confusion.
  9. Care to share? I mean - you posted a problem and then suddenly you solved it! Well - what did you do?
  10. offerwall website? send the message onto a web page? website method? What are these terms? Strange language!
  11. 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
  12. Which line of code is the bad one? That helps PS - My php manual does not show this function in use - mysqli_fetch_array
  13. 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.
  14. 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.
  15. "can only be edited in php"? Whatever does that mean?
  16. Sorry - no can do. I have a real hard time reading and following such confusing code. Switching in and out of php mode is so tedious.
  17. as an example of what exactly? You weren't trying to show us your own work? How silly to post it then! We DO know what a GET query looks like.
  18. Are you just trying to hack us while we are responding to your fake query for help? I just tried that example url of yours. It's written in Chinese! Normally I refuse to click on these kinds of things. For some ungodly reason I went against my better sense and exposed myself to your game. What a jerk!
  19. I suggest that you add a line to your code at the end of the function that builds that query statement and echo it out. See what you are actually building and then correct it. As was already pointed out to you you have to add quotes around string values in a query and you have ignored that advice.
  20. Is this page under your control, ie, did you write it or are you hosting it on your own account? If so you can modify how it works. Perhaps to use a POST method instead of a GET method and add a form to it to get the search argument.
  21. But - as Barand noted - there were so many other things plain wrong with your code. Wrong!
  22. Does this mean your problem is resolved?
  23. "just making websites for fun or little money"??? You'll have to upgrade your skill set to continue doing this hobby. Of course there are difficult things but what you are currently trying to accomplish is not that hard to do. You just have to organize your thoughts and write the correct code. So far from what you are asking that part is the hard thing for you to do currently. Perhaps you need to do some reading since you don't have a handle on the basics of files if you think that you can simply re-name an image file because you like a specific name. Once you manage to write a satisfactory (to you) upload module, you could then read up on the functions available (see the official PHP manual) to do re-sizing. Again - you will have to LEARN things. BTW - if this is just a hobby, why don't you have the time to learn about these things? Isn't part of a hobby the fact that you actually learn from it? It can't be much fun if it's always work because you haven't managed to figure things out. PS - have we managed to solve your original problem with the case of your filename?
  24. PHP HAS changed. The switch away from the mysql interface began several/many years ago. You're just a bit late to the party. And as chhorn says your script will cease to work once your provider removes it from his PHP install. The only reason it works for you now is because your provider is not moving quite yet, but sooner or later he will and then you'll be stuck. Of course if you are running your own db server and managing your own php installation, go right ahead living in the past. Eventually you will have to move on and then you will have to modify all of your programs. Will you then have the time to not only learn PDO but to make all those coding changes? I think not. Since your knowledge seems limited at this point anyway, why not spend a little time to pick up using PDO? It's a small investment in your skill set that will last a long time. Look at the manual for many good examples of how to make a connection, how to use prepared queries and their arguments and how to execute the query and fetch the results. It's really not much different than the mysql extension - just a few different concepts. And as for "always using jpg". If the file, ie, the image, is NOT a jpg file you cannot simply call it one since you may not be able to open it later on. What you need to do with proper file upload logic is to check what the file type is when it is being uploaded and decide if it is one of your expected types before accepting it and storing it in your picture repository. You don't just decide to name it as a ".jpg" file.
  25. NO that doesn't always work? A coder writes the code that holds that name - how the h... does it "not work"? Please elaborate. You are the first person whom I have seen using this convoluted naming convention. I have been reading these forums and coding PHP/HTML for about 6 years now. What does that tell you about your statement that it doesn't always work? And - autcomplete is an html feature (not php) that helps to finish providing the input value of the tag and has absolutely nothing to do with the name attribute clause. The assigned name will always be the assigned name from the time that the php script generates it, sends it, and receives it back unless someone hacks the page (and perhaps other input tags as well) and sends it back to your script corrupted. Good security procedures advise you to check for valid input "names" and their expected values. An altered input name attribute as I have already said is a sign that you should not use the inputs at that 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.