Anda di halaman 1dari 2

APPLICATION-a program or a group of programs designed Advantages of MYSQL

for use by an end user (for example customers, members, or


Fast, inexpensive, easy to use, can run on many operating
Product list).
systems, available in almost all webhost, technical support is
application -piece is the program or group of programs that available, secure, support large database, customizable.
performs the tasks. Programs create the display that the user
MySQL server is the manager of the database system. It
sees in the browser window; they make your application
handles all your database instructions.
interactive by accepting and processing information that the
user types in the browser window; and they store SQL (Structured Query Language), which is a standard
information in the database and get information out of the language understood by many RDBMSs.
database.
PHP, a scripting language designed specifically for use on the
Web based or Web application-If the end user interacts with Web, is your tool for creating dynamic Web pages.
the application via a Web browser, the application
PHP stands for PHP: HyperText Preprocessor.
Web Database Application-If the Web application requires
development by a guy named Rasmus Lerdorf, it was called
the long-term storage of information using a database. Itis
Personal Home Page tools
designed to help a user accomplish a task.
Advantages of PHP
Database- is the long-term memory of your Web database
application. The application can’t fulfill its purpose without Fast, inexpensive, easy to use, can run on many operating
the database. systems, available in almost all webhost, technical support is
available, secure, support large database, customizable.
-core of a Web database application is the database
PHP code is embedded in HTML code
-database is an electronic file cabinet that stores information
in an organized manner so that you can find it when you Web server is the software that delivers Web pages to the
need it world.
static-meaning the user can’t interact with the Web page. Web server is configured to expect certain file extensions to
All users see the same Web page contain PHP language statements. Often the extension is
.php or .phtml
Dynamic Web pages- allow the user to interact with the
Web page. Different users might see different Web pages. <? php echo “<p>Hello World</p>”; ?>
data is accessed by using a set of programs called a DBMS echo is a PHP instruction that tells PHP to output the
(Database Management System). upcoming text
MySQL is a fast, easy-to-use RDBMS used on many Web PHP is developed as a project of the Apache Software
sites. Foundation — thus, it works best with Apache.
MySQL Community Server: A freely downloadable, open Anatomy of a Website
source edition of MySQL, released early and often with the
most advanced features. A Web server: The software that delivers your Web pages to
the world
MySQL Enterprise Subscription-A comprehensive offering of
production support, monitoring tools, and MySQL database ✓ MySQL: The RDBMS (Relational Database Management
software. For a subscription fee paid per year per server, System) that will store information for your Web database
monthly software updates, consulting services, technical application
support, and other services are available.
✓ PHP: The scripting language that you’ll use to write the
programs that provide the dynamic functionality for your
Web site
Building Websites $newvariablename = sprintf(“%01.2f”, $oldvariablename);

✓ Your Web site: The site where your published Web site is sprintf can do more than format decimal places. If you want
located. The location where the public views your Web site. commas to separate thousands in your number, you can use
number_format.
✓ Your development site: The location where you develop
your Web pages. When your pages are complete, you then You need to tell PHP to interpret the single quote (’) as an
move them to your Web site. apostrophe instead of as the end of the string. You can do
this by using a backslash (\) in front of the single quote. The
IP address- The unique address used by computers to locate backslash tells PHP that the single quote does not have any
a Web site special meaning; it’s just an apostrophe. This is escaping the
Php Statements character

A block is enclosed by curly braces, { and }. The statements in Single-quoted and double-quoted strings are handled
a block execute together - complex statements differently. Single-quoted strings are stored literally, with the
exception of \’, which is stored as an apostrophe. In double-
PHP doesn’t care whether the statement keywords are in quoted strings, variables and some special characters are
uppercase or lowercase evaluated before the string is stored.
Variables are containers used to hold information. A variable The quotes that enclose the entire string determine the
has a name, and information is stored in the variable. treatment of variables and special characters, even if other
sets of quotes are inside the string.
 All variable names have a dollar sign ($) in front of
them. This tells PHP that it is a variable name. You can join strings, a process called concatenation, by using
a dot (.).
 Variable names can be any length.

 Variable names can include letters, numbers, and


underscores only.

 Variable names must begin with a letter or an


underscore. They cannot begin with a number.

 Uppercase and lowercase letters are not the same.

uncreate the variable by using this statement: unset($age);

A notice simply tells you that you’re doing something


unusual and to take a second look at what you’re doing. If
use a statement that includes a variable that does not exist

You can prevent notices in a program by inserting an at sign


(@) at the point where the notice would be issued

Constants- can’t be changed by the program. are used


when a value is needed several places in the program and
doesn’t change during the program.

You can set a constant by using the define statement.

define(“AGE”,29);

To put numbers into the proper format for dollars, you can
use sprintf.

Anda mungkin juga menyukai