Jump to content

trq

Staff Alumni
  • Posts

    30,999
  • Joined

  • Last visited

  • Days Won

    26

Everything posted by trq

  1. slideShow() doesn't have a stop() method. This code would need to be rewritten completely to do what your after. I suggest you start learning jQuery or find yourself a plugin.
  2. Sessions are unique to a particular user, so going on your description, they won't suite your needs at all.
  3. And what was the outcome?
  4. You just need to define multiple variables, then use multiple allow clauses, eg; SetEnvIf Referer foo\.com foo_referer SetEnvIf Referer example-domain\.co.uk example_referer <FilesMatch \.(eot|woff|ttf|svg)$> Order deny,allow Deny from all Allow from env=foo_referer Allow from env=eample_referer </FilesMatch>
  5. I already read that part. I asked what the problem was?
  6. 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.
  7. You can check mysql_affected_rows to see if any rows where updated.
  8. Any help? you haven't asked any question or described any issue.
  9. 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.
  10. 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.
  11. All user provided data needs to be validated and escaped before using it in any query.
  12. 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.
  13. 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.
  14. 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.
  15. You should always develop with error reporting and display error on.
  16. This board is for help with existing code. Where exactly are you stuck?
  17. 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.
  18. This topic has been moved to Installation in Windows. http://www.phpfreaks.com/forums/index.php?topic=351150.0
  19. This topic has been moved to Other Web Server Software. http://www.phpfreaks.com/forums/index.php?topic=351153.0
  20. This topic has been moved to Other Libraries and Frameworks. http://www.phpfreaks.com/forums/index.php?topic=351149.0
×
×
  • 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.