Jump to content

Jessica

Staff Alumni
  • Posts

    8,968
  • Joined

  • Last visited

  • Days Won

    41

Everything posted by Jessica

  1. Don't store it in the web root
  2. Good job on following one of the things I posted. :eyeroll:
  3. A. Don't post screenshots of your code, post the actual code. B. why are you running htmlentities on that name? C. Your where and on clauses are redundant D. Switch to using user id instead of username, it'll be a lot easier.
  4. You haven't given us enough information. You also need to look up how to use primary keys and foreign keys, and how to do a join.
  5. A completely different approach would be to use Flotr - it's a JavaScript library for graphing. It's one of the prettiest I've seen http://www.solutoire.com/experiments/flotr/examples/basic-axis.html You could very easily use PHP to generate the JS, or better yet JSON to send to Flotr.
  6. True. I've never used the submodules functionality but obviously it's better to learn to do it the right way I just thought maybe using separate branches for each might work.
  7. Use the full path
  8. Also, branches?
  9. Kevin, only a university graduate would be so confident they knew everything.
  10. No. Seriously you guys stop that. Backticks are for columns and tables. Quotes are for strings. Nothing goes around numbers and functions. End.
  11. OP: you need to echo the error you get from MySQL. It's probably having to do with trying to put a value into your primary key. Make that field auto increment and leave it out of your query.
  12. No, don't. Backticks are correct.
  13. Moving to the right forum.
  14. $10 Op is using a framework/form processing script.
  15. Sounds like you want to learn about things like design patterns. Ps: micro-optimization is a BAD thing. Not something you want to do.
  16. Even if its music I would enjoy, it's probably going to clash with whatever tv show I'm playing on Hulu/Netflix.
  17. Edit: ignore me.
  18. In addition to. Not instead of.
  19. It would help to see the actual MySQL error message. mysqli_error() + the actual string.
  20. All of those variables are undefined. Are you confused about what the word undefined means? For one thing, you only need to use the ids to delete the rows, not all that other stuff. You have a weird combination of an INSERT mixed with DELETE.
  21. You define a variable thusly: $var = 'value'; What's probably more important is A. which variable and B. what value you want it to have. Showing us only 1/10 of the error is kind of silly. If that's your entire code then you have some major issues. Like what do you think all of those variables should be? Edit: Furthermore, your DELETE query is way wrong.
  22. You need to turn on error_reporting set to E_ALL and find out what errors are being produced.
  23. So, you are expecting to get the data in your constructor. You wrote __construct($data). Yet you instantiate the class this way: $usr = new Users; So... I see your second function which is kind of silly to bother doing that. Obviously something isn't working in the process. Start debugging by printing the values at each point and see where you've lost the data.
  24. So, step one is go read the PHP manual section on functions. http://us2.php.net/functions Then maybe also go read about arrays.
×
×
  • 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.