Home
Credits
Affliates
Link Exchange

HTMLshaman
PHPshaman
LINUXshaman

Helpful Links
Web Design Images
Backgrounds
Icon Sets
GIF Images


Language Intro : The Basics

Lets start by making your first prototype PHP script and will be using Notepad for the editing.

Open up Notepad and then enter the following into the text editing program.
<?php
print "I love Marshmellows";
?>

After that, save this file as "test.php" and also as "test.ophp" where the .php is the right extension name and the .ophp is the wrong extension name.

Upload both and see what happens.

The .php file streams properly printing the text "I love Marshmellows" but the one with the wrong extension was regarded as a normal text file by the WebServer and streams everything. So naming it right is very very important.

Also to note is that even when you do a VIEW SOURCE from your web browser or even if you use a program like OFFLINE EXPLORER to rip or download the site, your php coding tays safe as the webserver will not allow it to be taken from the Port 80.

When scripting it is always nice to ahve some comments so as to know where and what a specific line does. These comment however, do not appear when the user loads a webpage but only when you open up the php source file.
// this is a comment
# this is also a comment
/* Anything withing the slash and star is a comment */ Nore that the first two will only be comments on the same line.


After all this, you can produce your first functional php script with the addition of HTML.
Refer to HTML Shaman for details on how to make HTML scripts if you don't already know.

Below is an example of how your first script will look like

<html>
<head>
<title>What do Shamans Like?</title>
</head>

<body>
<br>
<?php
/* This Prints my thoughts about what Shamans like to eat */
print "We <b>love</b> Marshmellows";
?>
</body>
</html>

Note that I have also placed a HTML code into the enclosed php function, because you are using the " tag, it will print as a HTML code and making the letters "love" bold.







Basics
Introduction
Compilation for Apache

Language Intro
The Basics
Structuring
Script Flow
Functions
Arrays
Objects

Extras
Global values

Simple Scripts
MySQL Query
File Upload
List Contents






Disclaimer:
Contents on this site is provided for educational purposes and will not be distributing source codes from any major commercial reference.
Partial code may be used to provide better understanding of how the program works or functions to illustrate to the reader more clearly.
Other programs that are provided freely on the internet may be placed as a quick solution to the user's needs taking in consideration that it is not altered in any way.

Our Recommended Links
prepaid phone card
Online Casino
Smiley Central
Ventrilo Servers
Counter-Strike Servers
Advertise Here
Advertise Here
Advertise Here
Advertise Here
Advertise Here
phone card

Advertise Here
Advertise Here
Advertise Here
Advertise Here
Advertise Here
Advertise Here
Advertise Here
Hollywood Lyrics
Resident Evil
Contact us at webmaster@galacnet.com for advertising opportunities on GalacNet.