Jump to content

Jessica

Staff Alumni
  • Posts

    8,968
  • Joined

  • Last visited

  • Days Won

    41

Everything posted by Jessica

  1. No, the query, not the result of the query. Put the query in a string, and echo it.
  2. Well that's isset() not !isset() What are you trying to do?
  3. So you can use if(!isset($_POST['name of checkbox'])){ }
  4. That looks like data that has been encoded twice. Are you running utf8_encode on the data at any point? I've seen that when I have data and I utf8_encode it, then accidentally encode it again.
  5. So make it a function with that key as an argument.
  6. print out the $_POST array using print_r, and see what is submitted when you don't check a box.
  7. As was pointed out, you need to remove the quotes around them
  8. are quantity and price columns in the table? Try wrapping your math in parens. Are you sure $id is set for both queries? What error do you get?
  9. I'm simply saying it is one option, and based on what the OP has said, it is the option he is trying to use. Otherwise why ask about the $_SERVER["HTTP_REFERER"} for previous page link? I agree that it's more useful to have it as hierarchy.
  10. You are correct. I hadn't really thought about that, though. I was just trying to give sample code to try to explain my method. Oh I know I just wanted to point it out as it's a problem I used to have all the time, using column names like order, desc, etc and then having errors.
  11. Well, there's clearly no image_path column in there. Where is your actual SQL statement? Show that as well.
  12. Breadcrumbs can also refer to the steps the user took to get to that page, a history like you'd see in the drop-down of your back bar. It isn't always the category structure.
  13. After while($row = $result->fetch(PDO::FETCH_BOTH)){ add print_r($row); and look/tell us what it contains.
  14. Do you know how to create a form in HTML? Do you know how to do a SELECT using a WHERE clause and an UPDATE also? That's the knowledge you need to do this, and you already have the business logic so where are you stuck?
  15. If you have a set of checkboxes with the same name, you will only ever get one of the values, unless you make the name an array, which you have not done.
  16. Good god use code tags. There's nothing in there relating to your question. And there's a ton of other errors, like every single one of your checkboxes has the same name. I recomend looking at some basic HTML/PHP tutorials then coming back to the project. You clearly don't even know what part of the code is doing what.
  17. Post your code, including SQL. What you said doesn't make sense. "If I want to know which brands contain only salt and vinegar" "Ideally the return Should only be: Brand Z contains Sugar=Y, Salt=Y, Vinegar=Y" That is not true. If you want to know which brands only contain salt and vinegar, your result should not have sugar=Y.
  18. Typically you would append something to the name to make it unique, such as the time(). AFAIK you cannot put images into a database using phpMyAdmin, which is a good thing. Images should not be stored in a DB.
  19. You should save images in the file system, and only save the file name and location in the database. You could also allow them to upload the image, and have a web interface for your admins to approve/reject. Rejected ones get deleted from filesystem and DB. Approved ones get a flag to be shown on the site.
×
×
  • 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.