Thursday, March 13, 2014

PHP

#Assalamualaikum

For this week class, we learnt how to create dynamic webpage using php. Since i didn't bring my laptop so I just you use the computer in laboratory. And fortunately, the computer has been installed with XAMPP so there was no need to install it :) But still , i need to install when i'm using my laptop. So, here is the steps.

Installing XAMPP.

  • just download from the internet.easy and free: http://www.apachefriends.org/download.html
  • done downloading?okay.Now, you need to stop IIS from running( control panel>administrative tools>IIS>stop). Since IIS is automatically run each time you start your windows,you need to run mySQL and apache if you want to use it ( start>XAMPP control panel>apache>start>mySQL>start)

1.Creating database using MySQL
  • database name(info)>create>table>save. For this step, i refer to app3 that has been installed in ipad.
2.Create connection to database


  • Open dreamweaver>Open mySQL connection to do connection to the database in dreamweaver
3.Create php file
  • Name as register.php. We need to use form because user will key in their details.
4.Use insert record.
  •    Data that have been entered by user will be saved into database.
5.Create another php file
  • Name it as view.php.View.php will display data that has been entered.

6.Use recordset. 
  • Data will be read back/view from the database and display at view.php
7.Use repeat region
  • to view all that that has been entered by user




***don't forget:After done php file.double check the insert record.Open register.php,go to server behavior, double click insert record (at the box), go to option {after inserting, go to}, choose view.php.


Okay, so this is the preview of my file (register.php) and view.php.



ASP VS PHP?

From my experiences , PHP is more easy to use as I can develop this simple registration page in about 20 minutes I guess. While, when using ASP i finished it in 3 days as i'm  facing so many problems ( refer to my last entry). When using ASP, there are so many settings need to be set up before you start developing the dynamic webpage ( such as ODBC ). But for php, you just need to set up a few settings in xampp, create table easily save and just start creating file in php.Besides, there will be no error for php. So, I prefer php as it wont give me stress.haha
**will be update more later

todays quote:


No comments:

Post a Comment