Jump to content

trq

Staff Alumni
  • Posts

    30,999
  • Joined

  • Last visited

  • Days Won

    26

Everything posted by trq

  1. This thread I replied to in 2006 should help. http://forums.phpfreaks.com/topic/22932-now-that-i-know-what-to-ask-here-goes/?hl=%2Bprofile&do=findComment&comment=103630
  2. I cover the basics here. What distro are you using?
  3. I wouldn't bother with firePHP, get yourself a proper debugger like xdebug or phpdbg.
  4. Then your connection is failing. You should always check that $con is what your expecting it to be before just going ahead and blindly using it.
  5. Why would you need any Ajax for this? $(".launch-modal").click(function() { var id = $(this).attr('id'); });
  6. elementId is the first argument passed into the setText function. Its a variable.
  7. Take a look at this part "curdate()-1", and then have a guess.
  8. Does "Application Design - Programming theory, database design, performance, etc." really sound like the right place for this question?
  9. Why are you using a url with require_once ? That won't work on most servers and is VERY inefficient and slow anyway.
  10. functions can not dump variables into the global namespace so that makes statement doesn't make any sense to me. Really, without seeing some example of what your talking about, I'm finding your post pretty hard to follow. Unless the code base was written with tests in mind it is highly unlikely that it is going to be very "testable". Your already talking about dependencies on variables from outside. This alone breaks the "unit" in "unit test".
  11. Aww... my little framework Proem is on that list.
  12. Why are you storing your data like that in the first place?
  13. You must have misread my replies.
  14. public function setmyvar($varstring){ $myvartest = $varstring; return $myvartest; } Should be.... public function setmyvar($varstring){ $this->myvartest = $varstring; return $this; } And before you get too much further, please take a look at: https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-1-basic-coding-standard.md
  15. Do you have a question?
  16. Where was "var page = 'page1';" in the example I posted? It wasn't. You pass it in as an argument to the function. Do you know what a function is? Do you know what an argument is?
  17. Again. Wrap the code you already have within your scroll.js in a function. You can then call this function passing it a page argument. scroll.js function scroll(page) { // your code // At some stage calls $.post('query.php?page=' + page); } Then you can just use: <script src="js/scroll.js"> </script> <script> scroll('page1'); </script> On page one and... <script src="js/scroll.js"> </script> <script> scroll('page2'); </script> on page two etc.
  18. http://google.com
  19. It is one way of handling things, and is probably pretty close to how most frameworks would handle it. Most frameworks have some form of "form" handling built in. Don't reinvent the wheel. No and No. Classes should be auto loaded using an autoloader (see spl_autload)
  20. Sounds like you need to read some basic ajax tutorials. Were not going to write one for you, there are plenty already out there.
  21. I'm not sure it can be explained any simpler.
  22. Read my reply again.
  23. CodeIgnitor is a terrible framework to learn anything from. It is poorly designed and poorly tested. it will teach new comers nothing but how to write poorly designed and poorly tested code.
  24. I'm not writing code for you. If you wrote the code you just posted you should have no issue implementing what I have described.
×
×
  • 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.