Code Newbie
News     Forums     Search     Members     Sign Up    

My Code Newbie
Username

Password

Articles/Snippets
ASP Classic
ASP.NET
C
C#
C++
HTML / CSS
Java
Javascript
Linux / BSD
Perl
PHP
Python
Ruby
SQL
VB 6
VB.NET

C.N. Friends
  Planet Rome

Link to Us!
Code Newbie
  Code Newbie
    forums
Go Back   Code Forums > Application and Web Development > PHP
User Name
Password

Reply
 
LinkBack Thread Tools Display Modes
Old 11-29-2007, 05:47 AM   #1 (permalink)
Norton
banned
 
Norton's Avatar
 
Join Date: Nov 2007
Posts: 3
Norton is on a distinguished road
Arrow html vs. php

Hello all master coders,

I have been doing my site exclusivley in html. What is the big differences bewteen php and html? What are the advantages/disadvantages? What, if any would be the penalty from going from an html site to a php site? Would this hurt the PR I have already gotten as well as the search results? Woud it appear to be a whole new site?

Please discuss.

Thanks in advance.

_________________
*SPAM LINKS REMOVED*
__________________

Last edited by Belisarius : 11-29-2007 at 01:22 PM. Reason: User was posting junk topics in order to post his links.
Norton is offline   Reply With Quote
Old 11-29-2007, 06:11 AM   #2 (permalink)
Kezzer
Recruit
 
Join Date: Nov 2007
Posts: 7
Kezzer is on a distinguished road
Send a message via Skype™ to Kezzer
You can't compare them, PHP is a scripting language, HTML is a markup language, they're designed to do different things entirely.

PHP allows dynamic content/execution whereas HTML is static.

Also, this can't really be discussed because there's nothing to discuss. My advice is to read a manual or at least look it up before you post here.
__________________
Kezzer is offline   Reply With Quote
Old 11-29-2007, 08:44 AM   #3 (permalink)
sde
Moderator
 
sde's Avatar
 
Join Date: May 2002
Location: us.ca
Posts: 4,397
sde is on a distinguished road
Hi Norton, welcome to the site.

Try thinking of it this way.

At the simplest level, PHP is a scripting language used to print out text to a browser. The text that PHP prints out is HTML.

Why use PHP? well, there are a ton of reasons yet most would be specific to what you are trying to accomplish.

One example is code re-use. You know that navigation you probably have on your site? Well, with pure HTML, if you need to change a link, you need to modify the same code on every single file that uses it.

With PHP, you can put your navigation HTML in one file, and include that file in all your pages. When the navigation changes, you just change one file.

nav.php
example:
PHP Code:
<a href="1.php">Nav 1</a>
<
a href="2.php">Nav 2</a>
<
a href="3.php">Nav 3</a
notice, HTML can go in .php files. generally you just name all your files .php even if they are primarily HTML. that's so you can insert PHP code when needed.

so here is where it all ties in.

mypage.php
PHP Code:
<html>
<body>

<?php
// this code below inserts nav.php as if that file were pasted
// directly into this HTML
include("nav.php");
?>

.. rest of the HTML goes here
</body>
</html>
So the point is, I can have 100 pages which share this same nav. When I need to modify the nav, I can simply change nav.php.

This is just one example I picked because I remember how neat I thought that was when I first started using PHP a long time ago.

Hope that helps. Don't hesitate to use this forum as you develop your PHP skills .. We have pretty good support here on that topic.
__________________
testing 1 2 3
sde is offline   Reply With Quote
Old 01-03-2008, 12:13 AM   #4 (permalink)
priji
Recruit
 
Join Date: Jan 2008
Posts: 5
priji is on a distinguished road
HTML defines the structure and layout of a Web document by using a variety of tags and attributes. PHP stands for PHP: Hypertext Preprocessor.
__________________
priji is offline   Reply With Quote
Reply


Thread Tools
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

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Make a search engine for your website with PHP zhisede PHP 3 10-25-2005 07:54 AM
PHP 5.0.4 and 4.3.11 Released sde Code Newbie News 0 04-20-2005 10:56 AM
Sending arbitrary PHP data to HTML forms saul PHP 12 03-14-2005 08:27 AM
PHP vs .NET Redline Lounge 1 11-24-2004 06:10 AM
HTML form preview then INSERT using PHP & MySQL SteveSoler PHP 5 07-07-2002 09:54 AM


All times are GMT -8. The time now is 02:15 AM.


Powered by vBulletin Version 3.6.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.0.0 RC8





Copyright © 2000-2006, Milano Interactive
Web Hosting provided by Portal 360 Web Hosting
Open Circle