1. Hey Guest Did you know you can win an Honor 10 phone worth ₹33,000 and an additional ₹70,000 in paytm vouchers, just by replying to some threads and taking part in the discussions happening in the Honor Hub?

    What are you waiting for? Start commenting and start winning! Remember to read the instructions posted here.

    Dismiss Notice

Ok Guys, Now What Is This PHP Thing ???

Discussion in 'QnA (read only)' started by Ashis, Sep 10, 2004.

Thread Status:
Not open for further replies.
  1. Ashis

    Ashis New Member

    Joined:
    Aug 14, 2004
    Messages:
    343
    Likes Received:
    0
    Trophy Points:
    0
    Location:
    Bhubaneswar
    What Is PHP? :x
    What Was Wrong With HTML?
    Some Body Give Some Ideas !
    :?: :?: :?: :?: :?: :?: :?: :?: :?: :?: :?: :?: :?: :?:
     
  2. alib_i

    alib_i New Member

    Joined:
    Jun 24, 2004
    Messages:
    1,191
    Likes Received:
    2
    Trophy Points:
    0
    Location:
    omnipresent
    HTML pages are .... how to say .. DEAD.
    you display whatever is saved on the .htm file

    But, php pages can be alive ..
    you can program them to display what you like ...

    say you want to show how many people have visited you site
    then you can use a php script for counting the number of hits ..
    the counter increases by one everytime someone visits your webpage.
    you can display the number of hits.

    this kind of dynamic behaviour is not possible with html
    but well there are other languages also that can produce dynamic pages ...
    ex. ASP, Perl, etc.

    PHP is found to be most userfriendly ..
     
  3. #/bin/sh

    #/bin/sh New Member

    Joined:
    Apr 20, 2004
    Messages:
    213
    Likes Received:
    0
    Trophy Points:
    0
    Location:
    42.65 N 73.76 W
    PHP is a language for creating interactive web sites and is used on over 3.3 million web sites around the world. It was originally called "Personal Home Page Tools" when it was created in 1994 by Rasmus Lerdorf to keep track of who was looking at his online resume.

    <html>
    <head>
    <title>My first PHP page</title>
    </head>
    <body>
    This is normal HTML code
    <?php

    // PHP code goes here
    ?>

    Back into normal HTML

    </body>
    </html>
    In this example, we see that PHP code is signified by the use of the <?php to begin the PHP block and ?> to signify the end of the code block. Although this a completely acceptable method of encapsulating your PHP code there are many other ways that are all, as far as syntax is concerned, correct. Here are some other ways to mark PHP code blocks.
     
  4. aadipa

    aadipa New Member

    Joined:
    Feb 12, 2004
    Messages:
    997
    Likes Received:
    2
    Trophy Points:
    0
    Location:
    Palghar, Mumbai
    HTML - static pages
    PHP - dynamic pages
     
  5. shehan9999

    shehan9999 New Member

    Joined:
    May 26, 2004
    Messages:
    26
    Likes Received:
    0
    Trophy Points:
    0
    Location:
    colombo, sri lanka
    think of it as a way of doing processing on the server side of a web connection.

    php pages can do stuff what u cant with javascript/ vbscript, which only allow u to do processing on the clients machne.....

    also the php code will not be displayed when the user opens the page containing the code. this is not possible with javascript/ vbscript.
     
  6. techie_it

    techie_it New Member

    Joined:
    Aug 2, 2004
    Messages:
    51
    Likes Received:
    0
    Trophy Points:
    0
    Location:
    Rite Here !!!!
    dude ..Only 1 thing i can say ...Just Log on to http://www.php.net .It will answer all ur questions...
     
  7. Avtar9

    Avtar9 New Member

    Joined:
    Feb 5, 2004
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    0
    Hypertext Preprocessor.

    It's a language far more versatile than HTML that can be used to create some dynamic web applications.
     
  8. Deep

    Deep Version 2.0

    Joined:
    Jan 23, 2004
    Messages:
    977
    Likes Received:
    0
    Trophy Points:
    0
    Location:
    Mumbai
    DHTML - Client side language..you can not create forums or login systems or connect to database using HTMl because everything is done at client side i.e. browser..

    PHP - It is server side language..it is used to create web applications like shopping carts, creating images (GD Library), forums...basically anything you can think of...

    how does it work?

    well its like...
    php will query the server for data and then after fetching the data it will convert the same in HTML or whatever format you see..

    for example...

    to get data from this post...PHP may query mysql like foll

    Code:
    $sql="SELECT * FROM posts where post_id=6896";
    $result = mysql_query($sql);
    $fetch_data = mysql_fetch_row($result);
    // rest will come here..
    
    so basically this query is just asking databse to get records for specified post id...

    and once it gets all details it i wll place all in html format..

    so what you see in the source code is simple html not the code which is written to make html (i.e. the code i mentioned before)

    i hope you got the point...

    so in short if you want to learn php, learn html first because its the base for all web languages...

    Regards
    Deep
     
  9. Maverick340

    Maverick340 New Member

    Joined:
    Mar 19, 2004
    Messages:
    635
    Likes Received:
    0
    Trophy Points:
    0
    where do you code PHP..like HTML can be done on notepad ..cand PHP also be coded on notepad..
     
  10. Deep

    Deep Version 2.0

    Joined:
    Jan 23, 2004
    Messages:
    977
    Likes Received:
    0
    Trophy Points:
    0
    Location:
    Mumbai
    no point in bumping old threads..please start new if you have questions...i am locking it...

    Deep
     
Thread Status:
Not open for further replies.

Share This Page