Database Reference
In-Depth Information
This IP number
indicates that the Web
server is on a separate
computer—if the Web
server is on your
computer itself, use
the URL
http://localhost/
DBP/VRG
Figure 11-29
the index.html Web Page
in VrG
If we now use either the URL http://localhost/DBC/VRG (if the Web server is on the
same computer we are working on) or the URL http://{Web server DNS Name or IP Number } /
DBC/VRG (if the Web server is on another computer), we get the Web page shown in
Figure 11-29.
By ThE WAy If you are working on a single computer, with the DBMS, Web server, and
development tools all installed together, you will see a consistent user
interface. It may be Windows XP, Windows Vista, or a version of Linux. This is, in fact,
typical of small development platforms and allows you to easily test each application
component as you create it.
In a larger production environment, however, the Web server and database server
(which may or may not be the same physical server) are separate from the developer's
workstation. In this case you, as the developer, will see different user interfaces de-
pending on which computer you are using.
We are illustrating this latter setup in this chapter. Our Web server (IIS) and DBMS
server (SQL Server 2012) are on one server running Windows Server 2012. Our de-
velopment tools (the IE 10 Web browser and the Eclipse IDE) are on a separate work-
station running Windows 8. Thus, you will see the differences in the user interface
depending on whether the work is being done on the server (e.g., in Figures 11-23
through 11-26) or on the workstation (e.g., Figure 11-29).
Using PhP
Now that we have our basic Web site set up, we will expand its capabilities with a Web
development environment that allows us to connect Web pages to our database. Several tech-
nologies allow us to do this. Developers using Microsoft products usually work with the .NET
framework and use ASP.NET technology. Developers who use the Apache Web server may
prefer creating JSP files in the JavaScript scripting language or using the Java programming
language in the Java Enterprise Edition ( Java EE) environment.
The PhP Scripting Language
In this chapter, we will use PHP, which is available as this is being written in versions 5.3.25 and 5.4.15
(we are using 5.3.21), and available for free download from the PHP Web site ( www.php.net ) . See
Appendix I for a complete discussion of installing and testing PHP on your computer. You should
download the latest version of PHP available for your operating system and install it on your com-
puter. In addition to Appendix I, documentation is available on the PHP Web site, and good discus-
sion can also be found by searching the Web for “PHP installation.” Setting up PHP usually requires
several steps (not just running an installation routine), so take some time and be sure you have PHP
running correctly. Also be sure to enable PHP Data Objects (PDO)—this is not done automatically.
 
Search WWH ::




Custom Search