Server Side Scripts

Client side technologies, that is HTML, CSS and Javascript, are standards based and you will use them on all your web projects.  The server side of life is much more varied.  Here we are talking about the backend technology that runs on your web server, technologies that perform many varied tasks but the most important of which is database connectivity.   There are a number of propriety technologies competing for your attention.  You could choose to use Microsoft’s ASP.net, Sun Microsystems JSP, Adobe’s Coldfusion or open source technologies such as Python, node.js, Ruby or PHP.  Programmers love to argue over which is best and I’m not going to get into that.  You are free to choose whichever you like for your backend.  I’ll just say this, as I write this in March 2017, PHP is still the most widely used server side technology.  The choice, as they say, is yours.

2 Thoughts to “PHP”

  1. Suresh kamal

    Could you please help me . I have a doubt in php MySQL. The doubt is how to insert a fixed variable in front of an auto increment field of a table . like Ref001,Ref002,Ref003 etc…

    thank you
    Suresh kamal

    1. admin

      The autoIncrement field in the mySQL would need to stay as a number – it can’t be a string. On the output you could concatenate the ‘ref’ prefix but you would need to do some calculations to add the double or single zeros as required. You do this with conditional logic seeing if the number was less than 10, greater that 99.

      ie

      if($myAutoIncrement < 10){
      $displayID = "ref00."$myAutoIncrement;
      }
      if($myAutoIncrement >= 10 && $myAutoIncrement <= 99){
      $displayID = "ref0."$myAutoIncrement;
      }
      if($myAutoIncrement > 99){
      $displayID = "ref."$myAutoIncrement;
      }
      

      Hope that helps.

Leave a Comment