1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

What is PHP..More about help abt PHP needed

Discussion in 'PHP' started by Rahul88, Jul 13, 2005.

  1. #1
    As the thread goes,what is PHP.How is it useful.I went to wordpress.org and i downloaded a file full of php scripts but it all went over my head.I wanna know how are they used and put up into websites.

    All kinds of help appreciated.
    Regards,
    Rahul
     
    Rahul88, Jul 13, 2005 IP
  2. digitalpoint

    digitalpoint Overlord of no one Staff

    Messages:
    38,333
    Likes Received:
    2,613
    Best Answers:
    462
    Trophy Points:
    710
    Digital Goods:
    29
    #2
    It's arguably one of the best programming/scripting languages out there (it's definitely my favorite). Without it, you wouldn't have things like WordPress, this forum, or any of the free tools that digitalpoint.com has.
     
    digitalpoint, Jul 13, 2005 IP
  3. Rahul88

    Rahul88 Peon

    Messages:
    10
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Thanks for telling me that but i wanted more details about it like how is it embedded into websites et all
     
    Rahul88, Jul 13, 2005 IP
  4. digitalpoint

    digitalpoint Overlord of no one Staff

    Messages:
    38,333
    Likes Received:
    2,613
    Best Answers:
    462
    Trophy Points:
    710
    Digital Goods:
    29
    #4
    digitalpoint, Jul 13, 2005 IP
  5. netaddict

    netaddict Peon

    Messages:
    640
    Likes Received:
    36
    Best Answers:
    0
    Trophy Points:
    0
    #5
    If you know a bit of programming (or even if you don't), you can work with PHP easily. With PHP, you can work with variables, process them and use them as the way you want.

    You can get variables to your php script through HTML forms, through databases or through cookies.
    Then process the variables the way you want. Then either display the required information, store the information in the databases or just get emailed them to you.

    To make your html files php enabled, just enter the following in the .htaccess file (if your sites are hosted on Linux)
    AddHandler application/x-httpd-php .php .htm .html

    Then, even in your html pages, you can embed php scripts.

    A simple example:

    This is your newsletter.html file:

    <html>
    <head>
    .
    .
    .
    </head>
    <body>
    whatever here
    <form name="newsletter" method="post" action="newsletter.php">
    Name :
    <input type="text" name="name">
    <input type="text" name="email">
    <input type="submit" name="Submit" value="Submit">
    </form>
    </body>
    </html>

    This is your newsletter.php

    <?php
    // this is a comment. below two lines r to get information from the html forms
    $name=$_POST['name'];
    $email=$_POST['email'];

    //using these variables, you can store the information in your database
    // or have it get emailed to you by using the following:

    mail('youremailaddress', 'Subject- new subscriber', 'message', "From: \"$name\" <$email>\nReply-To: \"$name\" <$email>\nX-Mailer: chfeedback.php 2.02" );

    ?>

    I am not sure if all the above syntax is correct, but it works this way.
    Here is a good link to start with PHP/MYSQL - http://www.freewebmasterhelp.com/tutorials/phpmysql/1

    Hope all that helps
     
    netaddict, Jul 13, 2005 IP
  6. Rahul88

    Rahul88 Peon

    Messages:
    10
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Thx Dude.......checking it out
     
    Rahul88, Jul 19, 2005 IP
  7. netaddict

    netaddict Peon

    Messages:
    640
    Likes Received:
    36
    Best Answers:
    0
    Trophy Points:
    0
    #7
    netaddict, Jul 19, 2005 IP
  8. prowess

    prowess Guest

    Messages:
    159
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #8
    I find that php.net is hard to use...I tend to go to hotscrips.com and searching for something similar, then modifying it to fit my needs...modifying is much easier than and coding for me!
     
    prowess, Jul 19, 2005 IP
  9. Avatar

    Avatar Peon

    Messages:
    79
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #9
    I'll explain PHP in a very basic way.

    Immagine a website is like a picture of a tiger, HTML is the black outline of the tiger, which shows you all the basic things, eyes,nose,face,body. PHP is the colour, depth and detail, it's what makes the tiger seem real.

    PHP allows you to interact with your users, let them communicate with you, do things which you would never dream of doing with just HTML, although its not easy, its a must to learn.
     
    Avatar, Oct 24, 2005 IP