Jump to content


  • Posts

  • Joined

  • Last visited

Posts posted by spiderwell

  1. of course it can be done, but perhaps with this new snippet i gave you, you could attempt something yourself first and come back when you get stuck. you would need to make a different comparison, my initial thoughts are a switch statement for the different scenarios rather than a very long  if/elseif statement

  2. essentially use substr to shorten the NIC to the first 2 digits, and again use it to get the last 2 digits of birthday, notice the differnce of the start point, 0 starts at the beginning for NIC and -2 starts 2 from the end of birthday


    $NIC = '85589458904';
    echo substr($NIC, 0,2);
    echo substr($birthday, -2,2);
    if(substr($NIC, 0,2) != substr($birthday, -2,2)) echo "no match";


    this is a server side colution, but apply the same principles into javascript for a client side solution

  3. i am assuming that the teachers details are stored in a database and all pulled through the same template page, like teacherprofile.php?id=12345. Simply add to table in the database a column called views, and have it add 1 to the views column when you pull out the data to show.


    This is certainly one method that would work for you


  4. I only started using Codeigniter this year, and it seems to do everything I need, i also found it easy to pick up and definately well documented.

    Should i just move on from it? I am keen to keep upto date, and as far as I knew Codeigniter is still 'active' and due a 3.0 release at somepoint in the future, surely this means it is not obsolete?


  • 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.