Forum     

Go Back   Digit Technology Discussion Forum > Portables, Peripherals and Electronics > QnA (read only)
Register FAQ Calendar Mark Forums Read

QnA (read only) Mods please help transfer the contents of this forum to proper sections. :)


 
 
LinkBack Thread Tools Search this Thread Display Modes
Old 10-09-2004, 10:59 AM   #1 (permalink)
In The Zone
 
Ashis's Avatar
 
Join Date: Aug 2004
Location: Bhubaneswar
Posts: 339
Default Ok Guys, Now What Is This PHP Thing ???


What Is PHP?
What Was Wrong With HTML?
Some Body Give Some Ideas !
Ashis is offline  
Advertisements. Register and be a member of the community to get rid of them.
Advertisement

Old 10-09-2004, 07:14 PM   #2 (permalink)
Wise Old Owl
 
alib_i's Avatar
 
Join Date: Jun 2004
Location: omnipresent
Posts: 1,191
Default

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 ..
__________________
What I've felt, What I've known; Never shined through in what I've shown
Never free, Never me; So I dub thee unforgiven
-Metallica
alib_i is offline  
Old 11-09-2004, 02:04 AM   #3 (permalink)
In The Zone
 
#/bin/sh's Avatar
 
Join Date: Apr 2004
Location: 42.65 N 73.76 W
Posts: 213
Default

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.
__________________
\"99 little bugs in the code, 99 bugs in the code, fix one bug, compile it again, 148 little bugs in the code. 148 little bugs in the code....\"
#/bin/sh is offline  
Old 11-09-2004, 06:46 AM   #4 (permalink)
Wise Old Owl
 
aadipa's Avatar
 
Join Date: Feb 2004
Location: Palghar, Mumbai
Posts: 1,000
Default

HTML - static pages
PHP - dynamic pages
__________________
i generally prefer quality over quantity
1 aadi + 1 aadi = 1 full ;)
aadipa is offline  
Old 11-09-2004, 04:25 PM   #5 (permalink)
Right Off the Assembly Line
 
Join Date: May 2004
Location: colombo, sri lanka
Posts: 26
Default

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.
__________________
a wise man once said:
\"he who laughs last.........doesn\'t get the joke\".
shehan9999 is offline  
Old 12-09-2004, 12:47 AM   #6 (permalink)
Apprentice
 
Join Date: Aug 2004
Location: Rite Here !!!!
Posts: 51
Default

dude ..Only 1 thing i can say ...Just Log on to http://www.php.net .It will answer all ur questions...
__________________
Zindagi Ek JUa..Kabhi..Jeet...Kabhi Haar.....
==========================
Byeeee

K.K
techie_it is offline  
Old 12-09-2004, 05:55 PM   #7 (permalink)
Right Off the Assembly Line
 
Join Date: Feb 2004
Posts: 3
Default

Hypertext Preprocessor.

It's a language far more versatile than HTML that can be used to create some dynamic web applications.
Avtar9 is offline  
Old 12-09-2004, 07:14 PM   #8 (permalink)
Version 2.0
 
Deep's Avatar
 
Join Date: Jan 2004
Location: Mumbai
Posts: 977
Default

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
__________________
- Deep Ganatra -
www.whoisdeep.com
www.twitter.com/DeepXP/
Deep is offline  
Old 03-07-2005, 12:06 PM   #9 (permalink)
Alpha Geek
 
Maverick340's Avatar
 
Join Date: Mar 2004
Posts: 635
Default

where do you code PHP..like HTML can be done on notepad ..cand PHP also be coded on notepad..
__________________
You and Me forever be ...
--
PSpwned
Maverick340 is offline  
Old 03-07-2005, 12:39 PM   #10 (permalink)
Version 2.0
 
Deep's Avatar
 
Join Date: Jan 2004
Location: Mumbai
Posts: 977
Default

Quote:
Originally Posted by amanwannalearn
where do you code PHP..like HTML can be done on notepad ..cand PHP also be coded on notepad..
no point in bumping old threads..please start new if you have questions...i am locking it...

Deep
__________________
- Deep Ganatra -
www.whoisdeep.com
www.twitter.com/DeepXP/
Deep is offline  
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


 
Latest Threads
- by trublu
- by topgear

Advertisement




All times are GMT +5.5. The time now is 09:06 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.

Search Engine Optimization by vBSEO 3.3.2