PHP Tutorial


php is a scripting language for websites. it is used in almost every site today. if you find a site that dont use php for even alittle something it is very very rare. php stands for ( php hypertext preprocessor ) yes the first p stands for php. weird huh? but anyways thats what it stands for.

before you start learning this. you must first check to see if your host supports php. if your unsure in a few i will show you an easy way to test to see if it does. if it dont support it you should try finding a new host that does.

::1st step::

  
 open windows explorer.   if you dont know what that is click start, goto 
 run, type explorer. alright  your inside windows explorer.

 click view  at the top of it,   then click folder options. click the view tab, 
 where it says hide file extensions,   make sure thats unselected..  
 then click ok..
  

::2nd Step::

 
 make a folder on the desktop. ( webpage ).. right click on the desktop 
 goto new then click folder. rename it ( webpage ).. click into the folder 
 webpage on the desktop.. now make a  ( test.php )  file.. click file at 
 the top.. then goto new.. new text document. rename the file from. 


         ( new text document.txt ) too ( test.php )..
 
  

::3rd Step::

if you already know your php works then skip this step. click into your folder and right click, then goto new -> new text document. a file will appear ( new text document.txt ) rename it to ( test.php ) and hit enter, and say yes im sure i want to rename it. right click on the file and click edit. then paste this into your notepad window, and click save. and upload it to your host. then punch in the address. ( yoururl.com/test.php ).

<?
phpinfo();
?>


you should get a pretty large webpage. describing every single thing that is installed and enabled on your host. if you get a blank white page. sorry you dont have php on this host. or you did a typo? try it again. but more in likely your host does not allow php. i would suggest finding a new host that does. because your missing out on alot of possibilitys.

::4th Step::

ok now its time to make your first script. like in step 2. you must create a ( new text document.txt ) and rename this one ( hello.php ) then copy and paste this code into it. then save it. and upload it to your host. just like in my c programing page. the default first program for any language is ( hello world! ). but that is so over used it sucks. so once again we are going to use ( hello dittmerdan ) for our first php script. paste this into notepad, then save and upload.

<?php
Echo "Hello, DittmerDan!";
?>


you should get a page with plain black text and a white background. that says ( Hello, DittmerDan! ). yay congratulations you created your first php script. time to go get drunk and celebrate. whooohoo!

more to come later. just throwing it up now uncompleted

but just hit up google and search for php scripts. you can find premade scripts to learn from. or edit them for your site to how you want etc. google php scripts, php tutorial, or certain scripts, like for instance a php guestbook. or php email form like on my contact page. but be sure to check this page out later. im just being lazy right now this second.





( DittmerDan.net ) © copyright 2009, all rights reserved. goto main - navigation