how does a PHP script look like? give example script with code

RegisterLogin
how does a PHP script look like? give example script with code
Post Description: how does a PHP script look like? give example script with code
Tags: how, does, a, PHP, script, look, like?, give, example, script, with, code
This Post Was Posted On Feb 29, 2008 By webmaster #1237
php exists as a tag indise an HTML file. like all HTML tags, it begins with a less than symbor or opening angel barcket (<), and ends with a greater than symbol. or closing angle braket (>) To distinguish it from other tags, the PHP tag has a question mark (?) following the opening abngle braket and preceding the closing angle barcke. all text outside the php ta is simply passed through the browser, text inside the tag is expected to tbe PHP code and is parsed.

to acomodate XML and some picky editors such as microsoft's fornt page PHP offers three toher way to make code. putting php after the opening questions marks make PHP code friendly to CML parsers. alternative, you amy use the script tag as if you were weriting javascript. finally, you can use tags that appear like ASP, using <% to start blcoks of code.

here is a simple php script that will display today's dat on your browser
first step is to open your text editor. you can use notepad if you are using windows.
then copy and paste this code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Displaying Today's Date</title>
</head>
<body>
<h3 align="center">Displaying Today's Date Script by Wallpaperama </h3>
<hr>
<p>Today's Date is : <?php print(date("1 f d, Y")); ?>
</p>
<p>&nbsp;</p>
<p align="center">PHP Web Hosting Provided by <a href="http://www.webune.com">Webune.com</a> </p>
</body>
</html>
Leave Your Comments
Related Pages: [Add Your Website]
Post New Topic
©2011 Webune Forums - Wed Dec 21, 2011 2:45 am
Powered by: Webune Forums V3