Archive for August 2009

How to use HTML Form in PHP

Monday, August 17, 2009 · Posted in ,

Form is one of the most important tool in making and designing a website or web application. Through the use of form you can send any values to another page. try to observe the given sample code below.



HTML Code:




<html>

<head>

<title>Title goes heretitle>

head>

<body>



<form action="welcome.php" method="post">



<label>Name:label><input type="text" name="name"><br/>

<label>Age:label><input type="text" name="age"><br/>

<input type="submit" name="btn_submit">



form>



body>

html>



The page contains two input fields and a submit button in which it has a type of text and a name of name and age.



Sample Output 1:


and if we were going to run the code above and then this would be the output of the code that we have made above in which it has a two input fields in which this field will be use in getting the value that comes from the user and also the submit button.



HTML with PHP Code:

<html>

<head>

<title>Title goes heretitle>

head>

<body>



Welcome echo $_POST['name']; ?>.<br/>

You are echo $_POST['age']; ?> years old.



body>

html>

and this would be our another page in which it has a filename of welcome.php. As you notice that its filename is being put at the from action so that when the user click the submit button and then it pass the value the being input by the user through the use of the form and then the form will past the value the the welcome.php and will directly display the value in the page. As you notice in the code we embed the php code in the HTML code. In this code we have the opening and the closing PHP tag. The variable array $_post["name"]; and $_post["age"]; are the two variables that holds the value that came from the form and this variable also uses to display the value that being input in the form.


Sample Output 2:








Goodbye and Thank You Tita Cory

Tuesday, August 04, 2009 · Posted in

Last Saturday morning, I was really shock when I first heard the news that our dearest former President Corazon Aquino died, because of the colon cancer. I can’t really imagine how it comes. My 9 years old cousin asked me of who Cory Aquino is? And I thought her that she was the mother of the first EDSA revolution and the mother of the democracy, and I asked her. “Why Filipino did called her as the mother of EDSA and democracy?” and she said “YES”. I told her that Cory Aquino called as the Mother of EDSA and the mother of democracy it is because she is the one who brought to us the type of government which is the democracy which literary means FREEDOM.

I am only 19 years old boy and a student and even me I didn’t seen and witness the First EDSA Revolution but I know what Cory had done to our country during that time. So people of the Philippines we should not have to waste what our beloved former President done. Let’s remember always of what Cory had made to us and who give us freedom. So Thank you very much Tita Cory and we are lucky and grateful of all you have done for us and to our country. Cory Hindi ka Nagiisa sa Lahat ng Laban mo.

So lets all take care of the legacy of our beloved former President. This Democracy and freedom that we are enjoying now lets take care of it.

Powered by Blogger.