Monday, March 29, 2010

Reflection on developing a website using PHP (2) --Create the login, registration and view page.

1. Create and connect the login and registration page:

For the login and register page, they are usually created considering the security.

Step1: Create a new page.

Step2: Insert form, table, and text field. (Place the tables as you like)

Step3: Edit every text field through property panel. (the name, length, type…)

2. Write a data into the database using the Insert Record:

Insert Record is a server behavior that will be used to store data into the database file.

Step1: Server Behavioràpress plus “+”buttonà Insert Record.

Step2: Select the connection you have created before.

Step3: Make sure each text field get a value or each value will be inserted into the correct field in the database.

3. Create the view page:

View page means reading or viewing a data from a database using the Recordset. The recordset is a server behavior that will be used to read back from a database file.

Step1: Create a new view page.

Step2: Create a layout using the form, table, and text field.

Step3: Go to server behavioràpress plus “+”àRecordset.

Step4: Choose the right name, connection and table.

In columns: choose “all”

In sort: choose “Ascending”

Step5: After testing, click ok.

4. Binding:

Go to Binding, press plus “+”button, and choose Recordset. You can see the existing Recordset created before. Click “+”sign which is in front of the Recordset, you can see all the fields in the database. Drag them into the proper place in the view page. Draw a line under the table and highlight the table and the lineà Server Behavior à “+”àrepeat region. In the window table, choose Recordset and show the all records.

For a website, login page and registration page are not a necessity. Usually, it will depend on the goal of the website. Educational websites usually don’t set the login page because the main purpose of this kind of website is to educate people and to give knowledge.

No comments:

Post a Comment