WebArtz - The Web Design Forum
Welcome to WebArtz, Guest!

WebArtz is a nice place for discussions related to web designing and coding. We help our members to code their own website templates with HTML and CSS. We give them advice on various issues.

To know more about WebArtz Forum, visit the About Us page.

At the moment, you are viewing the forum as a guest. As a guest you can't make post and participate in discussions. You need to register and become a member of the forum. Click the register link below and become a part of this forum.

Thank You

WebArtz - The Web Design Forum
Welcome to WebArtz, Guest!

WebArtz is a nice place for discussions related to web designing and coding. We help our members to code their own website templates with HTML and CSS. We give them advice on various issues.

To know more about WebArtz Forum, visit the About Us page.

At the moment, you are viewing the forum as a guest. As a guest you can't make post and participate in discussions. You need to register and become a member of the forum. Click the register link below and become a part of this forum.

Thank You


You are not connected. Please login or register

View previous topic View next topic Go down  Message [Page 1 of 1]

1Accespted What is PHP? Tue Dec 07, 2010 12:03 am

Unknown Data

Unknown Data
Registered Member
Registered Member
What is PHP?
Learn PHP - part 1


Introduction
I expect a basic knowledge of html and css before you start learning PHP.

As in all my other lessons will I here try to illustrate the articles with examples to assist understanding.
The subsequent lessons are very basic PHP, because I here have focused on a gentle introduction to the programming language. The lessons give you an understanding of PHP as server side language, and in the end will I do a little simple counter, that you can use on your website.

The goal of subsequent sessions is to give you a basic knowledge about PHP and it's use as a server side programming language.

What is PHP?
PHP is a Open Source scripting language that specefies to web developning. It's a short for Hypertext Preprocessor and is a scriptting language. This means that the server perform/compose html document before it is sent to the client browser.

It's also important to know that PHP files ends with .php, .php3, .php4 or .phtml.

Here is a little example of what PHP is.
Code:
<html>
<head>
<title>Example</title>
</head>
<body>

    <?php
    echo "Hello world!";
    ?>

</body>
</html>
It will show up like this.

Hello world!

Note the actual php code, that is enclosed in a special start whith "<?php" and the end with "?>". These tags allows you to jump into and out of "PHP mode". Echo command reproduce it as is in quotation marks. Remember to finish with the colon.

What do I need?
• To write own scripts, will you need a text editor like "Notepad" or "TextPad". If you use Windows will "NotePad" default be installed, if you use a Linux machine may you run the editor "WE".
• To test your scripts, will you obviously need a server where PHP is installed and allowed.

To make a test, can you try writing following code.
Code:
<?php

    phpinfo();

?>

Save the code as test.php and upload it to your server.
If PHP is allowed will a long list shows up, and you then can start whith PHP.

In the next lesson, will we take a look at some other rules.

Notice : This tutorial is copyrighted by WebArtz Forum. You may not publish it on anywhere without written permission from the administrators.



Last edited by Unknown Data on Thu Dec 09, 2010 10:12 pm; edited 1 time in total

http://woops.dk

2Accespted Re: What is PHP? Tue Dec 07, 2010 12:22 am

Monster

Monster
Registered Member
Registered Member
Great tutorial Very Happy

http://webdesignz.createforum.eu

3Accespted Re: What is PHP? Tue Dec 07, 2010 12:23 am

Unknown Data

Unknown Data
Registered Member
Registered Member
Thanks! Smile

http://woops.dk

4Accespted Re: What is PHP? Tue Dec 07, 2010 7:40 am

verrell123

verrell123
Registered Member
Registered Member
Monster wrote:Great tutorial Very Happy

http://www.freshartz.co.cc/

5Accespted Re: What is PHP? Tue Dec 07, 2010 8:49 am

YanOri

YanOri
Registered Member
Registered Member
Awesome, so you gonna teach basic scripting in php.
I would suggest you to include a simple step to install PHP on a local machine, since its the core part of the tutorial too, anyways great job mate Smile

6Accespted Re: What is PHP? Tue Dec 07, 2010 8:54 pm

Unknown Data

Unknown Data
Registered Member
Registered Member
Thanks PurPL3 and verrel123 Very Happy

I'm going to teach the basics with some variables and loops, but not the big stuff, so anyone won't get to much confused. But in the end, will I make a tut about making a Counter. Smile

http://woops.dk

7Accespted Re: What is PHP? Thu Dec 09, 2010 9:20 am

YanOri

YanOri
Registered Member
Registered Member
can i propose a small contribution to the PHP tutorial ? or only a single person must continue what he / she has started ?

UD, sorry for they delayed report, i didn't go through the complete tuto in the first time.

some suggestions / corrections ::

What do I need?

i would suggest using notepadd++ (free) or phpdesigner (paid, comes with a 21 day trial period)

phpinfo(); >> Its a default php function that gives you the complete information about the php configurations on your server

Also, using

Code:
<?

    phpinfo();

?>

is highly not recommended, if you're on a server with short tags disabled, you will not get the results

Instead, use the code

Code:
<?php

    phpinfo();

?>

8Accespted Re: What is PHP? Thu Dec 09, 2010 10:09 pm

Unknown Data

Unknown Data
Registered Member
Registered Member
About the "What do I need?" have I placed notepad(windows) only, because it's a default installed program. I've, on another websupport website, got used to only talking about programs there are default installed, and that's why I didn't wrote those two. Smile

The <? phpinfo(); ?> was a fail from me, I totally forgot about write "php" inside it. I'll edit it now. Embarassed

Thanks for your inputs. Very Happy

http://woops.dk

9Accespted Re: What is PHP? Thu Dec 09, 2010 10:13 pm

YanOri

YanOri
Registered Member
Registered Member
Unknown Data wrote:About the "What do I need?" have I placed notepad(windows) only, because it's a default installed program. I've, on another web support website, got used to only talking about programs there are default installed, and that's why I didn't wrote those two. Smile

Oh i see, then that's ok Smile

If I'm allowed to, i will start a tutorial session about PHP scripts, is that ok ?

Spoiler:

10Accespted Re: What is PHP? Thu Dec 09, 2010 10:20 pm

Unknown Data

Unknown Data
Registered Member
Registered Member
That sounds good! Very Happy

I don't know so much about it yet, so I'll only explain something about the rules, variables, loops and a counterscript at the end. Smile

http://woops.dk

11Accespted Re: What is PHP? Thu Dec 09, 2010 10:22 pm

YanOri

YanOri
Registered Member
Registered Member
ok, will jump over it as soon as my exams are over, thank you Smile

Sponsored content


View previous topic View next topic Back to top  Message [Page 1 of 1]

Permissions in this forum:
You cannot reply to topics in this forum