Hi,

What's the difference between ASP and PHP? - What's best

    I think that the best for beginner is asp because microsoft give support. But the problem with asp You need to know the Vb language and C# language. I you know them it will be easy to you to make apsx web page. And you can even add you personnal classes.

    I prefer php because make session variable is alot easier then asp.

    In php you just use.

    session_start();
    
    //if the username exist in the session
    if(isset($_SESSION['username']))
    {
        $username = $_SESSION['username'];
    }
    else
    {
       $username = "";
    }
    

    To check if the session exist.

    But for ASP its alot harder 🙁

    
    'Declare a variable
      Dim username As String = ""
    
    
    ' Check if the username exist.
    Foreach Keys in Session.Keys
       If Keys.Equals('username')
           ' Check if the username is not empty
           If username.Length > 0 Then
    
             username = Session('username')
       Else
             username =  ""
       End If
      Else
           username = ""
      End IF
    Next
    
    

    I take me more than 3 day to find that answer to check if the session was empty. and I didnt find an anwer on the web.

    But I like asp but I prefer php because of Asp give me problem with the postback methods. I need to pratice more to masterise ASP and PHP.

    Have a nice day 😃

      Am I not right in thinking ASP (classic) is no longer supported by Microsoft? ASP.NET is a totally different ballgame so i'll assume your referring to ASP classic.

      There is no real "better" solution - it all comes down to what you want to do and what you need to do.

      You can google for hours with "language a vs language b" - you'll find arguements for anything.

      Why don't you consider Perl? or Python? or.....

      Basically, your question doesn't have an answer. Not one answer anyway, it has many and most of them are very subjective.

        I was talking about ASP.Net

        Im talking french . Thats why its so difficult to understand me.

        I was just giving my suggestion about the php language.

        I dont know perl and Python language. I only learn C# and VB. to make ASP.NET
        web pages.

        Thats why, you should not take my opinon seriously. But Making page in asp.net is harder for me because I dont masterise asp.net functions.

        Have a nice day😃

          ASP.NET is VERY good for rapid application development. It does many things for you that take seconds to set up.

          For example, form validation and processing is all automated. Login management with user roles is all there with classes and controls that are all very customizable.

          ASP.NET and PHP are just very different... ASP.NET is object oriented like JAva and forces the use of classes.

          umm one nice thing about ASP.NET is you can code in many languages;
          C#, VB.NET, IronRuby, IronPython, J# and i'm sure there are more...

            dougal85 wrote:

            ASP.NET is VERY good for rapid application development. It does many things for you that take seconds to set up.

            For example, form validation and processing is all automated. Login management with user roles is all there with classes and controls that are all very customizable.

            ASP.NET and PHP are just very different... ASP.NET is object oriented like JAva and forces the use of classes.

            umm one nice thing about ASP.NET is you can code in many languages;
            C#, VB.NET, IronRuby, IronPython, J# and i'm sure there are more...

            You right but.

            Some time its annoying to make web page and When you need to pass variable, you dont have problem with autoPostBack?. 🙂

            and I dont understand all the fonction that I see in visual studio.

            Ex : ASP Login.
            Link a datasource with an ASP TAble.
            (I know how to link my datasource and show each row in a table without using the Asp table.)

            I would be good for me if I know how to link the database with the Predefiended ASP Table.

            😃

              ASP.NET does indeed have a steeper learning curve that PHP... However, not understanding something isn't a good reason to not like it. It's a good reason to start learning it.

              The funniest thing about this post is that its on a PHP board, you're not going to get a pro .NET response, if you post this on the forums as www.asp.net you'll get a totally different answer.

              Anyway, thats all ive got to say on the matter.

              For the record I don't like either language over the other, they both have their uses and advantages.

                dougal85 wrote:

                ASP.NET does indeed have a steeper learning curve that PHP... However, not understanding something isn't a good reason to not like it. It's a good reason to start learning it.

                The funniest thing about this post is that its on a PHP board, you're not going to get a pro .NET response, if you post this on the forums as www.asp.net you'll get a totally different answer.

                Anyway, thats all ive got to say on the matter.

                For the record I don't like either language over the other, they both have their uses and advantages.

                Yes you right...

                My bad 😃

                  I think this forum is a bit bias to be asking a question like that..

                    As dougal85 has pointed out, this community has PHP as its focus, so such a poll is unlikely to be fair. Even if it was fair, it would be meaningless since "best" depends on the situation.

                      Am I correct that ASP.NET is only available on Windows platforms, or has that changed? Assuming that's still true, PHP has any version of ASP beat in terms of portability.

                        Asp -> Access database
                        Php -> MySQL, PostGrey and every other DB

                          Xager wrote:

                          Asp -> Access database
                          ...

                          I believe the ADO.NET framework will allow interfacing with most of the same DBMS's as PHP will.

                            NogDog wrote:

                            I believe the ADO.NET framework will allow interfacing with most of the same DBMS's as PHP will.

                            oh, didn't know that.

                              NogDog wrote:

                              I believe the ADO.NET framework will allow interfacing with most of the same DBMS's as PHP will.

                              Indeed it does. Although, when I used it with mySQL it felt like the two didn't quite sit well together. It all worked fine, just different styles maybe?

                              Xager wrote:

                              Asp -> Access database
                              Php -> MySQL, PostGrey and every other DB

                              The obvious one you've missed there is MS SQL Server, Microsoft's main DBMS.

                              I don't imagine Access is ever used for anything serious.

                                Moving to a more appropriate forum: the one with all the "X versus PHP" threads.

                                  NogDog wrote:

                                  Am I correct that ASP.NET is only available on Windows platforms, or has that changed? Assuming that's still true, PHP has any version of ASP beat in terms of portability.

                                  Mono :evilgrin:

                                    serenade2 wrote:

                                    I prefer php because make session variable is alot easier then asp.

                                    I don't do VB but I imagine something like this is possible

                                    ' Check if the username exist.
                                    Dim username As string
                                    If( !isEmpty( Session( "username" ))
                                      username = Session( "username" )
                                    Else
                                     username = "";
                                    End If
                                    
                                      Dysan wrote:

                                      Hi,

                                      What's the difference between ASP and PHP? - What's best

                                      funny, I have this peculiar mysterious feeling :o
                                      you should get other answers and other pollresult
                                      if asking this at an ASP Programmers Web forum

                                      regars 🙂 of course i voted for our homeground team flavour: PHP !!

                                      halojoy

                                        serenade2 wrote:

                                        To check if the session exist.

                                        But for ASP its alot harder 🙁

                                        
                                        'Declare a variable
                                          Dim username As String = ""
                                        
                                        
                                        ' Check if the username exist.
                                        Foreach Keys in Session.Keys
                                           If Keys.Equals('username')
                                               ' Check if the username is not empty
                                               If username.Length > 0 Then
                                        
                                                 username = Session('username')
                                           Else
                                                 username =  ""
                                           End If
                                          Else
                                               username = ""
                                          End IF
                                        Next
                                        
                                        

                                        Huh??? Overkill!

                                        Why not just do

                                        Dim username
                                        if session("username") <> "" then
                                             username = session("username")
                                        else
                                             username = ""
                                        end if