Jump to content

trq

Staff Alumni
  • Posts

    30,999
  • Joined

  • Last visited

  • Days Won

    26

Everything posted by trq

  1. Iv'e siad this before but it's just anormal request. Just like you requesting a page with your browser. In order to have a function executed you could use a simple series of if statement, or build a very simple front controller: <?php if (isset($_GET['action')) { if (function_exists('action' . ucfirst($_GET['action'])) { $func = 'action' . ucfirst($_GET['action']); $func(); } } function actionFoo() { return json_encode(array('msg' => 'Hello from foo()')); } // more functions. Then just use a url such as /somepath/somescript?action=foo in your Ajax call.
  2. And what exactly is your question / problem? Just make a new vhost and setup it's Document root to use the *card* directory. At it's simplest: <VirtualHost *:80> ServerName card.gamerstats.net DocumentRoot "/path/to/card" </VirtualHost>
  3. Child classes inherit all parent's properties and methods.
  4. Yes it's possible. Querying a database doesn't really have anything to do with CI though, though I suppose you could use it's DB libraries if you where that way inclined. Anyway, all you need do is write a script, and have that script executed via cron. http://en.wikipedia.org/wiki/Cron
  5. <label for="gender">Gender:</label> <select id="gender" name="gender"> <option value="">--</option> <option value="F"<?php (isset($gender) && $gender == "F") ? 'selected="selected"' : ''; ?>>Female</option> <option value="M"<?php (isset($gender) && $gender == "M") ? 'selected="selected"' : ''; ?>>Male</option> </select>
  6. This topic has been moved to CSS Help. http://www.phpfreaks.com/forums/index.php?topic=356577.0
  7. JavaScript string object has it's own replace() method. https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/String/replace
  8. This topic has been moved to PHP Coding Help. http://www.phpfreaks.com/forums/index.php?topic=356564.0
  9. There are literally thousands of tutorials around that cover the subject. Where exactly are you stuck?
  10. If your looking for the number of rows returned it's mysql_num_rows.
  11. Your going to need to be a lot more specific than that I'm afraid.
  12. You will also need to add this name to a local DNS server or at minimum your hosts file to get this working.
  13. Use $_SERVER['DOCUMENT_ROOT'] as the base of your includes. Because server can be configured to serve from different locations on the filesystem.
  14. This topic has been moved to mod_rewrite. http://www.phpfreaks.com/forums/index.php?topic=356538.0
  15. Yeah.. I agree. The site looks fine, professional, all that good stuff... but what exactly is it that your MVC does? You should provide some sort of demonstration on your site. Then again, I do feel rather ignorant on the subject of MVC.. maybe it's self explanatory if I knew it? Regardless, you need to demonstrate WHY your framework is good. Oh, indeed that is all planned. Unfortunately however, the framework is in such early stages that it is difficult at this point in time to show too much functionality. I guess it does need an overview or roadmap page.
  16. This topic has been moved to PHP Applications. http://www.phpfreaks.com/forums/index.php?topic=356485.0
  17. A controller can use many different models, but a model generally represent a single table when modelling stuff from a database.
  18. I don't think it gets much simpler than the site I already linked you to.
  19. Are you sure the code that connects to the database is being included into the above problematic script?
  20. This topic has been moved to PHP Applications. http://www.phpfreaks.com/forums/index.php?topic=356453.0
  21. Your connection is *not* fine. The error clearly states so.
  22. There is no mention of a blank page in the op's post.
  23. I also found setting initial-scale=1 works well.
×
×
  • 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.