Jump to content

trq

Staff Alumni
  • Posts

    30,999
  • Joined

  • Last visited

  • Days Won

    26

Everything posted by trq

  1. I already read that part. I asked what the problem was?
  2. What's the problem?
  3. The problem here is that you have posted too much code. Narrow your problem down to a reasonable example and someone might actually look at it.
  4. isset, empty.
  5. You can check mysql_affected_rows to see if any rows where updated.
  6. Any help? you haven't asked any question or described any issue.
  7. mysql_query() returns true or false when executing queries that don't return a result resource. If you try an update a record that doesn't exist using mysql_query() you will egt an error.
  8. Have you tried checking to see if the query has succeeded by checking the results it returns? Also, take a look at the output of mysql_error. Another good idea is to store your query in a variable and echo it to make sure it looks as you expect. Sorry, but your code is very poorly formatted or a I would actually look at it.
  9. What have you done to debug the issue?
  10. All user provided data needs to be validated and escaped before using it in any query.
  11. I definitely wouldn't go near the source of SMF for inspiration on application design. While it does have a plugins system it's pretty clumsy IMO.
  12. This is probably not something that can be easily explained within a simple forum reply. But recently I have been working on an 'Event Manager' for php which implements something similar to "hooks". I blogged about it here http://thorpesystems.com/2011/11/very-simple-events-in-php/ Using a system similar to this you can have your application trigger events at specific locations and your plugins would listen for these events and act upon them.
  13. How exactly does this hide anything though? You would still need to include this file into every other fiel that requires a database connection. You could of course set the environment variables within your vhost config or .htaccess file, but still, these aren't exactly hidden.
  14. You should always develop with error reporting and display error on.
  15. This board is for help with existing code. Where exactly are you stuck?
  16. If you are familiar enough with MVC you will understand that data is represented by Models. Your 'Order' class should represent a record from within your 'Orders' database table. It is fine for a Model such as this to depend on a 'Database' class. But this class should implement a well defined interface and should be passed to the Model via dependency injection of some variety.
  17. This topic has been moved to Installation in Windows. http://www.phpfreaks.com/forums/index.php?topic=351150.0
  18. This topic has been moved to Other Web Server Software. http://www.phpfreaks.com/forums/index.php?topic=351153.0
  19. And.... you have done what to attempt this?
  20. This topic has been moved to Other Libraries and Frameworks. http://www.phpfreaks.com/forums/index.php?topic=351149.0
  21. Do you really think your post is detailed enough to be any help to us or yourself?
  22. This topic has been moved to Other Web Server Software. http://www.phpfreaks.com/forums/index.php?topic=351144.0
  23. The error you are receiving is a PHP error, not mysql. There is nothing in the code you have provided that would produce that error. PHP will tell you where is halted because of the error, you will often find that the error however occurs a a few lines prior to where PHP halted.
  24. onChange is a client side event, PHP executes on the server.
×
×
  • 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.