Jump to content

trq

Staff Alumni
  • Posts

    30,999
  • Joined

  • Last visited

  • Days Won

    26

Everything posted by trq

  1. You can probably solve that by simply giving the 'block' element a higher z-index than that of your overlay. You should seriously considering finding a good book or something on jQuery though. There really is no need to mix js in with your markup these days.
  2. I'm in Australia. I wasn't saying McDonalds kids get $40/hr. I meant the people within my work's IT dept. I should imagine the going rate at McDonalds would be around $14/hr here.
  3. You can execute commands using the exec family of functions providing you setup the correct permissions. ie: The Apache user will need permission to execute xyz command.
  4. These are generally used when you might dynamically add AND clauses to there WHERE clause. It just depends on your logic for adding them.
  5. I usually use a few different tools to maintain my applications. Of course this wasn't (and still isn't) always the case, but, in an ideal world I would..... Document all specs from clients 'feature requests' as structure, behavior & interaction diagrams using UML. Document all classes using phpDocumentor. Ensure the entire development process is tracked via an issue tracker (I use atlassians Jira), and all work is commented and committed into version tracking software such as subversion. All unit tests are maintained within the same repository and supplied with the application. This is basically how I work at work, though often outside of my day job, things are more rushed. Who owns what depends on what is written into the contract, but generally, clients own the rights build upon the software I write for them. They can manipulate it however they like, they just can't resell it.
  6. Take a look at the documentation supplied with some benchmark.
  7. Your functions don't return any data & md_chef_image() uses variables which aren't defined anywhere. You might need to look at http://php.net/functions to get an idea of the basics.
  8. Syntax wise there doesn't seem to be much wrong. there are the closing </span> and </p> tags though that don't seem to belong, but there's nothing (syntax wise) wrong with the php.
  9. How exactly did you get rid of the error?
  10. Have you read the big sticky HEADER ERRORS in the top of this board?
  11. That's all well and good, but if the OP has permission he may as well make a proper connection to the database and just use. Unfortunately however, the OP isn't being very helpful with his questions / responses to other questions.
  12. I think that is a completely different project to the vanilla you are using. But anyway, a true mvc only has one access point (typically index.php). All other files are required from there. That would mean the shebang would only need to go within the one file (index.php).
  13. trq

    Error

    One thing would be to read my last reply.
  14. trq

    Error

    That would break any encapsulation you may have. Your design is pretty floored anyways though. Ideally, you would pass your database object (ensuring it implements some interface) to the construct of the userClass.
  15. trq

    Error

    Still, it won't exists within the userClass.
  16. trq

    Error

    Pfff. You haven't even declared any methods within the dbClass as static. This.... $query = dbClass::sql ( "users", "WHERE `id` = '$userId'" ); should be.... $db = new dbClass($host, $username, $password, $table); $query = $db->sql("users", "WHERE `id` = '$userId'" ); ps: The $table variable is misleading, it should be $dbname or similar.
  17. That means your query is failing. Considering 'password' is a mysql function you will likely need to change the name of that field to something else. or escape it using `backticks`.
  18. trq

    Error

    We would need to see more code. Generally though. Static methods get over used by people who don't know what they are doing / how they work. A database class really needs to be instantiated because it should store at least a little state.
  19. Not really, especially if you used a framework like jQuery. here is the code I wrote for a faq at work. $(document).ready(function() { $('.answer').hide(); $("a[name^='faq-']").each(function() { $(this).click(function() { if($("#"+this.name).is(':hidden')) { $("#"+this.name).fadeIn('slow'); } else { $("#"+this.name).fadeOut('slow'); } }); }); $('.answer').click(function() { $(this).fadeOut(); }); }); All you need then is some pretty simply markup. <ul class="faq"> <li><a name="faq-1">This is question 1</a> <div class="answer" id="faq-1"> <p>This is the answer to question 1</p> </div> </li> <li><a name="faq-2">This is question 2</a> <div class="answer" id="faq-2"> <p>This is the answer to question 2</p> </div> </li> </ul>
  20. trq

    Error

    The sql method is static, you cannot use $this within a static method because you do not have an object to refer to.
  21. The solution to your problem is Javascript. PHP executes server-side.
×
×
  • 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.