Jump to content

trq

Staff Alumni
  • Posts

    30,999
  • Joined

  • Last visited

  • Days Won

    26

Everything posted by trq

  1. Someone just posted a link to this tutorial in my twitter feed. You might find it useful.
  2. Then you need to write a *log* function of some sort and execute it whenever specific actions are taken.
  3. Your going to need to provide a lot more information than that I'm afraid.
  4. Um, I assume that is simply how it compares images.
  5. SELECT MAX(blah) FROM tbl WHERE flb = 'whatever' Will always return 1 record.
  6. To do this well, it's not really something that can be covered within a simple forum reply, and there are also numerous ways of implementing it. The basics however are simple: Break the url into parts, and match those parts against a series of regular expressions. If those parts regular expressions match, check to see if we can turn that match into an object and method within said object. If we can, execute them, otherwise, rinse and repeat. As an example, I'll show you how I have implemented it. It basically all comes down to the order in which your routes are matched. If you look at my framework's (Proem - yes I'm going to use it as an example) default routes (here) you should be able to see how this can be implemented (Each of these *tokens* starting with : are replaced internally with more complex regular expressions). When it comes time to attempt to dispatch a request to a controller, all of these route rules are looped through and checked against the current request url. When one matches, the dispatcher will check to see if it can actually instantiate a controller and call the *action* method. In Proem this happens in two stages. Firstly we loop through all matching routes (here) and when a match is found a route.match event is triggered which in turn tests to see if the object can be dispatched (here). The actual check happens within the standard dispatcher here.
  7. You need to implement the functions that are missing. I'm not sure it could be put any simpler.
  8. That would generate an error in the first place because session_is_registered expects a string. Anyway, the $_SESSION array is no different to any other. Just check the index exists. <?php session_start(); if (!isset($_SESSION['artistusername'])) { header("location:login.php"); }
  9. Just use the $_SESSION array, there is no need to register anything.
  10. Why don't you ask the people who are already telling you there is an issue?
  11. I'm not sure where your looking at tutorials, but they are out of date. session_register has been deprecated for a long time. As for your issue. I see no call to session_start.
  12. That's Ubuntu for ya. The most bloated Linux distro to date.
  13. This topic has been moved to Application Design. http://www.phpfreaks.com/forums/index.php?topic=361104.0
  14. Nice try smoseley, but $this->menu_array is still undefined.
  15. This topic has been moved to PHP Installation & Configuration. http://www.phpfreaks.com/forums/index.php?topic=361079.0
  16. You haven't loaded jQuery into that jsfiddle page.
  17. You never set $this->menu_array to anything.
  18. Because on each iteration you are resetting the array to empty. Read your code.
  19. You haven't exactly described your problem, what do you want us to do? Sounds like your looking for a programmer.
  20. PHP executes server side. Unless you have your users input there timezone, php has no way of knowing.
  21. You forgot to describe your problem.
  22. Without sending html email it's not possible.
×
×
  • 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.