PHP vs Perl

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • crokett
    The Full Monte
    • Jan 2003
    • 10627
    • Mebane, NC, USA.
    • Ryobi BT3000

    #1

    PHP vs Perl

    Ok, new question. I played some this weekend and implemented a perl script that checks to see if a table exists on a remote database. If it does it deletes it then recreates it and fills it with a few records. I have another that generates a form and when you enter text in the text field it then pops it up on the page. the way I am doing this is the web browser loads the perl script that generates the html page and prints it into the browser window.

    Eventually I will get to users sumbitting registration info, etc that gets stored on the database. So... question - is any of this easier in PHP? I have a little experience with perl, mostly for searching text files. I have no experience with PHP.
    David

    The chief cause of failure in this life is giving up what you want most for what you want at the moment.
  • Alex Franke
    Veteran Member
    • Feb 2007
    • 2641
    • Chapel Hill, NC
    • Ryobi BT3100

    #2
    Yes, you'll probably end up wanting to use PHP (or ASP.NET if you're already writing in VB.NET). It's a very capable language with a great user community. There's a reason a good chunk of the web software out there (like this forum for example) is written in PHP...
    online at http://www.theFrankes.com
    while ( !( succeed = try() ) ) ;
    "Life is short, Art long, Occasion sudden and dangerous, Experience deceitful, and Judgment difficult." -Hippocrates

    Comment

    • linear
      Senior Member
      • May 2004
      • 612
      • DeSoto, KS, USA.
      • Ryobi BT3100

      #3
      PHP makes it easier to handle the part that interfaces to the user. PHP syntax is somewhat less idiosyncratic compared to perl. Perl has modules already written and tested for you that do a lot of heavy lifting.

      Whatever technology you use, just please don't pass user input to the db without validation. I guess that's the web programming equivalent of paint the red line.

      PHP has a couple functions made to sanitize user input, but validating input is not quite as trivial as using them.
      --Rob

      sigpic

      Comment

      • Alex Franke
        Veteran Member
        • Feb 2007
        • 2641
        • Chapel Hill, NC
        • Ryobi BT3100

        #4
        Originally posted by linear
        Whatever technology you use, just please don't pass user input to the db without validation. I guess that's the web programming equivalent of paint the red line.
        I second that. This is very important -- especially if you're storing sensitive stuff in the database. Validation protects against SQL injection attacks, and it's also just good practice.
        online at http://www.theFrankes.com
        while ( !( succeed = try() ) ) ;
        "Life is short, Art long, Occasion sudden and dangerous, Experience deceitful, and Judgment difficult." -Hippocrates

        Comment

        Working...