OfficeRay 1.2
For Webforms & Web Applications
     
Basic HTML for Web Forms

In this tutorial, we will write our first php codes.

<!DOCTYPE HTML PUBLIC "-/W3C/DTD HTML 4.01 Transitional/EN" "http://www.w3.org/TR/html4/loose.dtd">

<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="content-type">
<title>Hello OfficeRay!</title>
</head>
<body>
My First OfficeRay Tutorial

<form name='input' action='' method='post'>

<br><br>
My Firstname
<input type='text' name='firstname'>

<br><br>
My Gender
<input type='radio' name='gender' value='male'> Male
<input type='radio' name='gender' value='female'> Female

<br><br>
My Hobby
<input type='checkbox' name='reading' value='reading'> Reading
<input type='checkbox' name='cooking' value='cooking'> Cooking

<br><br>
My Country
<select name='country'>
<option value='usa'>USA</option>
<option value='china'>China</option>
<option value='malaysia'>Malaysia</option>
</select>

<br><br>
About Me
<textarea rows="3" cols="30">I love php and mysql</textarea>

<br><br>
<input type="submit" value="Submit This Form">

</form>

</body>
</html>

Run under Windows

  1. Install Xampp for Windows.
  2. Install Notepadplus.
  3. View hidden extensions.
  4. Open Notepadplus, copy the codes above and paste.
  5. Save as index.php in d:\xampp\htdocs\testweb so it becomes:

    d:\xampp\htdocs\testweb\index.php
     

Run under Ubuntu Linux

  1. Install Xampp for Linux.
  2. Install Scite.
  3. Open Scite, copy the codes above and paste.
  4. Save as index.php in the testweb folder on the desktop so it becomes:

    /home/username/Desktop/testweb/index.php
     

Open a web browser and type: http://localhost/testweb
You will see the following:

Run under Windows Run under Linux
 

If you submit the form by pressing the "Submit This Form" button, nothing happens. Tutorial 3 will start showing you how to make something happens when the button is clicked!

Comments
  1. No comment yet!
Your Comment
Name *
Email *
Website
Guide
 
  • Blog
    Misc Rambling & Tips
     
  • Tutorial
    Step By Step Guide on Web Forms and Web Apps
     
  • News
    OfficeRay Release History, Updates & Bugfixes
     

 

 

 

 

 

     
new officeray.com