Jump to content

Jessica

Staff Alumni
  • Posts

    8,968
  • Joined

  • Last visited

  • Days Won

    41

Everything posted by Jessica

  1. You added it *where*? Post your new code.
  2. Well there's no get param. It's not set to '', it just doesn't exist. You need to add a check to see if it is or is not set and default it to "home".
  3. Uhm, yes. $query is what you called your result set. What we were telling you to change.
  4. That's not the right object. It expects a result set. What in your code creates a result object?
  5. Remove all the @ and read the line the message tells you is wrong.
  6. *smh* I just told you what the problem was.
  7. You're not FIXING the error, you're HIDING it. You ARE getting errors, you just IGNORED them. That error is VERY VERY useful. It's telling you it expects a specific object. You're giving it a string. Look at your code - what argument are you giving mysqli_num_rows? It's not "as hard as possible", it's actually very clear English. Slow down and think about what each line does.
  8. You need to remove all the @ What do you get when you run the query in mysql?
  9. You're suppressing errors and not catching others. Read the debugging SQL link in my signature.
  10. Try checking for SQL errors, see my signature.
  11. Hardcoding lookup ids and repeating the same code on every PHP page - probably about the worst possible way to create a dynamic site. You're still going to have to update your pages every time you make a new one. All you have done is create MORE work for yourself with absolutely no benefit. Don't get pissy with me because you can't wander a simple question. I'm not being sarcastic at all in any of my posts. The solution you've come up with is time wasting and offers no benefit. If you could bother to stop and think, and answer a simple question I asked you or try the solution I was suggesting, you might actually code something useful.
  12. Add a variable outside of the function, such as "clicked", and declare it false. The first line of the function should check if it's false. if it is, set it to true and do everything else.
  13. If you're viewing page #2, your url should look like page.php?id=2 Then in your code you can do $id = (int) $_GET['id']; Easy.
  14. You need to turn on error reporting, and you'd see a big problem. Edit: Uh oh, what have I done? :-P
  15. You're not actually learning anything by copying and pasting and not knowing what it does. Look up the syntax in the manual, and read the manual. Look for Strings first.
  16. The best way I've found is to have a hidden input with an obvious name like "comments" or "message". If it IS filled in, that's a bot.
  17. There you go - you have an id. You would typically use the URL query string to specify the id, then use $_GET to get it.
  18. If you don't know how can we help you? Again. It's not a trick question, it should have a simple answer. Something like an id or a page name. If you have two sets of data how do YOU KNOW when you look at them which set goes with which page? If you really don't know then the data is meaningless!!!
  19. It's like if you had an address book with a bunch of addresses and phone numbers and no way to tell who they belong to...
  20. So you just have a list of meta data with NO CLUE what page each item goes with? What's the point then?
×
×
  • 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.