Friday, November 14, 2008

Basic syntax for php

The most basic syntax for php scripting block starts with:

<?php and ends with ?>


It is embedded inside html and need to be save as .php extension in order for it to be executed.

In html, the sign below was used for inserting comments between the codes without being executed.

<!-- -->

However, it is different for php:

// your comment


for short comments



/* your long
comment */


for long comments



echo is use for displaying the text to the browser output window



Below is the example code:


< html>
< body>
<?php
echo "I love the World";
?>
</body>
</html>



After saving it as .php, browser will read it as:

I love the World

Friday, October 31, 2008

list list list

http://css.maxdesign.com.au/listamatic/horizontal02.htm#

Nice place to know about creating list with using only html and css..

From this list you can take a look at the source codes and try to learn about it. There are also tutorial inside the site which may be helpful. This is one of the ways to create nice list at your website. It only use html and css.

As for me, the first time I look at this source code, I feel confused because I still haven't learnt about css selectors. However, I gradually start to understand why they write the code in that way. Still there are some unimportant coding that you can remove without disturbing the functions of the coding. I guess I will leave it for you to detect it. =)

All the best to you.

Thursday, October 30, 2008

Create blog template - Blogger

I found site that teach us how to edit and create blogger template..
This site is very useful.. Hope you can learn something from it..

http://www.ourblogtemplates.com/2007/06/tutorials-on-blogger-template-design.html

This is a good way how we can see the insider of blogger template and try to do some modification on our own. After knowing how to do modifications, meybe we can proceed to make our own templates.

All the best..

Monday, October 27, 2008

Need to learn the basic first

Hi there,

Recently I've been trying to do some of website programming. Now I realized that in order to do php programming I need to master the basic programming such as html and css. So I suggest that we learn these programmings before proceed to our main target which is the php programming. I also think that java script is very important to implement our website programming ability.

First of all I already tried to do the html programming with using only notepad or other text editor. The basic structures are as shown below:




<.html>

<.head>
<.title>
your title here
<./title>

<./head>

<.h1> This is your content title <./h1>

<.body>

<.div style="css code here">
Your content goes here
<./div>

<./body>

<./html>




As usual the full-stop symbol need to be removed in order for the script to be usable.

After finish typing the scripts, you must save-as type >>> "all files" and put the name ending with .html

We will continue about html and css later because tomorrow I will present my final year undergraduate project. Wish me luck.. =)

**Please try the script above to see the result. Please do not copy paste but type it yourself so you can feel the process.. 

Tuesday, October 21, 2008

Text Editors and phpinfo();

Below are some of the guides in using different kind of Text Editors:

1.    Microsoft Words/ StarOffice Writer/ Abiword >>> save as “Plain Text” in order for PHP to be able to read and execute the programme.

2.    Note Pad >>> there are 2 ways to save it to be php files:
        
        a) When saving the file name type “name.php” together WITH the QUOTE marks.
        b) During saving process, choose “all files” from the file type drag box. After that you can save the “name.php” WITHOUT the QUOTE marks.

** You can change the >name< in to your desired name.**


===Editors with “syntax highlighting” better so it is easier to detect mistakes.===


Fuhh!!~~ Maybe you can call me noob, but SERIOUSLY I don’t know about this before, so I guess there are also people like me out there. =)


The next script that I learn today is the “Get system information from PHP”..

L0L I don’t have any ideas what this is all about..
But I try to type it here:


<.?php phpinfo (); ?>




p.s I type it with my own fingers. No COPY & PASTE method yaaa!! =)


WHAT IS THAT ACTUALLY???

Let’s try to google about it…. Loading….

Hmm.. I googled about it, but I got back to php.net instead and the explanation is simple. It is about getting information about the php for example about the version, configuration settings, bla~bla~ and so on..

I guess that’s it for now.. Huh.. Learn one new thing..
Maybe I need to just look at the commands that are available and slowly grab the understanding.. ^_^

Do not give up!

Wednesday, October 15, 2008

Testing my first PHP Script!! :)

Right now I am trying use the echo statement. This is used as an language construct. Actually I am quite blurr right now. Maybe because I am sleepy due to only sleep 3 hours today.. T_T
Ok, nevermind. I want to paste the simple psp script programming:

<.html>
<.head>
<.title>PHP Test<./title>
<./head>
<.body>
<.?php echo '<.p>Hello World<./p>'; ?>
<./body>
<./html>

First time seeing this script, I taught it was just a simple HTML script. But the different is at the

<.?php echo '<.p>Hello World<./p>';?>

p.s I need to add dot after the "<" so that others can see what I want them to see. ^^ But I still cannot see what is the use of this language construct. Here got some more script about the echo.

I need to come back to this part later to continue. Right now my head is spinning..
If anyone has any easier way to explain this, please help me and those who rite now are trying to figure about this too. For you maybe it is EASY. But for us, is considered as HARD.
Ok then.. I'll be back in the near future.

I will not move before I understand about this part. ^_^

Re-read 1
Re-read 2

Saturday, October 11, 2008

Introduction tutorial?

Now I want to visit the introductory tutorial.
Hmm.. It says here that they want me to learn the very basic about this PHP. It's about creating dynamic webpage (this is only from many functions of PHP).

Before continuing, I would like to know what is Dynamic Webpage?

Here's what I got about it:
 

     "A web document that is created from a database in real-time
       or "on the fly" at the same time it is being viewed, providing
       a continuous flow of new information and giving visitors a
       new experience each time they visit the web site.

       Dynamic web sites offer the user the ability to interact with
       the web site. This interaction can take place in the form of a
       search for products, a questionnaire that automatically posts
       results or online polls. Basically, dynamic web pages and
       content are generated from the input of the user
."

reference: http://www.vidoni.com.au/html/glossary.html

From what I understand about this dynamic webpage is, each of dynamic site's visitors will get new surfing experience on the page. Provided they respond to the input's required. So this is like a pre-setup form where visitors will fill in and the content presentation will be presented to them according to the data. But how will they fill in I am still not sure about it.

So before I start learn to write the code, I need to make sure that my server support the PHP file extensions.

How to make sure?
"ask your server administrator to be sure..."

Saturday, October 4, 2008

What is PHP?

PHP is a widely-used general-purpose scripting language that is especially suited for web development and can be embedded into HTML. I am new to PHP and want to get some idea of how it works, I should try the introductory tutorial. After that, I need to check out the online manual, and the example archive sites and some of the other resources available in the links section.

So the first thing to do is to:

[1] Go to the introductory tutorial
[2] Check the online Manual
[3] See the examples
[4] Visit the links section

Ok then, that's all for now.
This is my 1st journey into learning php. Come let us learn together. It's gonna be fun!
:)

p.s I treat this blog as my diary and my check list for learning PHP programming..
Maybe this gonna help anyone who also want to learn php together.