ok the first thing you should know is your os (unless certain versions of linux) will not have php enviroments installed. so cant not be easyly created by notepad alone also even if your computer does have php enviroments enabled you will only be able to view it (it as in the compiled version) as a client which basic means you can only see what the end product of your script will be once you view it in your browser if testing on your own server or on a host that you have if you install it on your own pc then you will have to go to http://127.0.0.1 when you have the server up and running.

step 2 how to get the php installer

look for a program called php triad it will install apache, php and mysql. which on a whole is VERY useful. they are tool which will come in handy. you can also look for other php installers but this is the one i like and thats why i recomend it but you will able to get more infomation from the sites at the bottom of my post.

step 3 hopefully you have the php enviroments installed or have a host. like http://5gigs.com

you will be able to start testing scripts

ok for the first test you will learn about varibles

varible always have a $ at the start of the sentance they can not have - in them spaces or start with a number. varibles are good for storeing data and can be changed in what ever way you can think of. so here is the sample script Code:

<?php $testvar = " test me baby ";

print $testvar ; ?>

what this will do once viewed in the browser via the webserver will print the words

i forgot to add one thing that i should of said. like most web scripts they have to declare them selfs like html. to declear that the script is php you have to start with <?php and end the script with ?>

thanks and the program should already be in the download section..

ok heres the next step on using varibles. i havent got a working server with me at the moment. tho i have a few tools with me. so we have our script with a test string in it.

so say we have a html submit form that submits jus a single string so you can make you varible more flexible. Code:<html> <form action="test.php" method="POST">

input data please : <input type="text" name="test" />

<input type="submit" /> </form> </html>

now jus make this as a normal html file. hopefully you have done html already so i wont need to explain that.

now we make the php script that will handle the input "test" and look at or change the varible. we will also use a if.. else statement. this is incase the data input is not true it will return false. Code:

what i did there was the simple start to making your site passworded. the great thing about php is clients will only be able to see whats in promted by the browser so they wont be able to see the password at all unless you did Code:

print("my password is :admin");

or something stupid like that.

you can see a version of this script ready made at http://pureone.t35.com/guess.html forgive me for the pop up that happens the host is shitty please disable java script before you goto the site. dont disable java disable java script..

ok ill explain what happen in the code.. first i stated that the incoming data from the html script would become $test. then i said that if the varible $test was identical to "admin" print welcome admin. if it wasnt identical to admin (if returned false.) print "piss off".

ok now for differnt ways to change the data input. this one is one i made a little while back its not very useful but shows a point on how flexible varibles can be. Code:<html> <form action="math.php" method="POST"> first nubmer please: <input type="text" name="no1" /> second number: <input type="text" name="no2" /> third : <input type="text" name="no3" /> 4th : <input type="text" name="no4" /> <input type="submit" /> </form> </html>

ok what i did extra here function and statement wise is 1 the && which means and. 2 the "" which means empty and 3 changed the varible with a function decbin which changes numbers to the binary equiv.

so the way it would go is takes the varibles makes them what there ment to be submited info. and them check IF there is no data in the varible is there is data in the varible. print the data in binray form..

html = hyper text mark up languge

php = hypertext processer

its a languge for websites used for databases and all sorts. very secure. unless not scripted right. most forums are php because php can acces databases such as mysql. you can tell what type of languge a website is using by 1 looking at the url you are at. 2 reading the source code.

ok php has built in maths fuctions much like most languges. Code:

+ = plus - = minus / = divide * = multiple

no say your doing something in maths you want to create a certain value for something say VAT which is the tax that gets added on to your purchase in uk. now this may not be the right way to find the tax for a product but it should hopefully explain how to do maths with php.

now this will divide the number posted by 100 then times the number2 divided by 100.

making strings more global.

lets look at search engines for a moment. how would do they make them universal? well one thing i have noticed with google is no matter what way you put the letters caps or not it will always find the same results. this is because they will reshape the words submited. how would they do that you make ask? well by using php built in functions.

stroupper() = all upper case letters.

so Code:$test = "test this"; print stroupper($test);

will print TEST THIS

strolower() = all lower case letters.

so Code:$test = "TEST THIS"; pring strolower($test);

will print test this

another function that can be used for correcting grammer.

ucwords = this makes the first letter of each string goto caps.

so Code:

$test = "test this"; print ucwords($test);

will print Test This.

but say some one has submited something that looks like

tHiS if you use the ucwords on it you will get THIS because it does not touch any other letters then the letters at the start of the string. so how to correct this? well you need to chuck another arguement in there.