Monday, March 29, 2010

Reflection on developing a website using PHP (1) ---Insert Database

In order to finish the project for web-based multimedia development, I reviewed what I had learned about Dreamweaver. Now I will make a summary about the process for develop this website with the purpose that it could be beneficial for both consolidating the knowledge and future study need. Because it is a really tedious job, so I will focus on different part each time.

1. Create a new site:

Step 1: Create a new site (siteànew site)

Step2: Name you site name: URL: localhost/project/

Step3: Use a server technology: PHP.MyAQL

Step4: Save the site: C: /xammp/htdocs/project (PHP)

Annotation: C: /inetpub/wwwroot/project (ASP)

2. Set up a batabase:

Step1: Open http://localhost/xammp/splash/php

Step2: Choose PHP.Myadmin and set the username and password.

Step3: Press the button to create a database: name should be related to the website theme.

Step4: Create the table (the number of name, field…).

Step5: Choose the suitable properties for each item. (type, null, extraàauto-increment for ID).

Annotation: (For ASP)

Step1: Open Microsoft accessà click at Black Database.

Step2: Save it at C: /inetput/wwwroot/data

Step3: “Create” buttonànew table.

Step4: Create the fields in the table. (Memo date type can hold characters more than text)

Step5: View databaseàDesign viewàdatabase.

3. Set up a connection:

Go to database and press “+” and choose “MySQL connection”. And then fill the following table. Input the connection name that you want and input the localhost in "MySQL server " table. Input your admin username and password. At last, choose the database you created in MySQL. Then first test, if it is successful, click ok.

Annotation: Create a website with ASP, you should choose “Database”àplus”+”àCustom Connection string.





Following you can see a tutorial about PHP basics. I hope it will be useful for you.





No comments:

Post a Comment