Perl and Your Database Driven Website

Web Hosting That Works
WebMail

Home Page

New To Websites
  Website Primer
  Site Costs

eCommerce
  About eCommerce
  Shopping Cart
  Merchant Account

Data Centers
  Web Servers
  Data Protection
  RAID & Archive

Web Hosting
  Virtual Host
  Managed
  Dedicated
  Compare Plans
  FAQ
  Cities We Serve

Domain Name
  Naming Tips
  Register

HTML
  FrontPage
  Page Design
  Images
  HTML Tags
  Color Chart

JavaScript
  Introduction
  Resourses

Database
  Database Demo
  MySQL
  DBI
  Perl
  PHP

Programming
  Perl   JavaScript
  JSP vs ASP
  Tips

CGI
  Basics
  Email Forms
  Example Form

eMarketing
  Search Engines
  Interactivity
  Marketing 101

EMail
  About Email
  OutlookExpress
  Spam Filter
  Email Viruses

FTP
  WS_FTP Program



Web Host Ratings

 



Contact Jon Day (877 329-4839 or Jon@DaySite.Net to discuss your web site database programming needs.

Perl Databases and Webpages

Perl is the most used programming language on the Internet. Partly due to its simplicity, mostly due to is strengths. Perl has also been around for a long time, so lots of programmers know it. In addition there are thousands of pragrams and modules already written to accomplish just about anything you want. Perl is particularly good at manipulating text. Yes text, like what you find in a database, and what makes up a Website.

Combining Perl with a nimble database like MySQL, through the DBI interface is powerful, as well as easy to learn. It is hard to beat this combination when the task involves generating on-the-fly, or dynamically generated Webpages.

Example Uses

  • Display available inventory
  • Log customer of inventory orders
  • Real time customer account information
  • Tracking the order status
  • Logging email communications
  • Colaborative Webpage design and updates
  • Membership or company directory display and maintenance

Plus a couple of thousand other uses.

The following script is written in Perl, uses DBI to extract a single record from a MySQL database. The initial inquiry could be a Webpage with a form where the user is asked for identification or password, in this example we call it 'membernumber':



Again, a very simple example. But let's review it step-by-step.

  • First we tell the server that this script is to be run with Perl
  • Then we call the CGI.pm module, which takes care of a lot of messy work.
  • Then the DBI module is called up to interface between the Perl and the Database
  • Then we tell DBI that we are using a database called 'databasename' in the MySQL database server, which requires 'username' and 'password'
  • Then we parse the incoming membernumber and assign it to a variable appropriately called '$memernumber'. NOTE: the Dollar sign in front of a name makes a Per variable.
  • Then comes the SQL call to the database:
    We are calling for the (name, address, city, state, zip, phone, email) fields
    from the 'membership' table
    which has the specified 'membernumber' listed in the membernumber field
    and execute the quiry
  • Next we use fetchrow_array(); to assign appropriately named variable and extracted field data to them
  • Now we tell the Browser to print in HTML format
  • and print the form with appropriately located variables.

Now that wasn't so hard was it. But from here it grows and grows.

The DaySite Web servers are equipped with all the tools necessary to create elaborate database applications using Perl, MySQL, DBI and CGI.




DaySite Web Hosting
1400 North Beach Street
Ormond Beach (Daytona), Florida 32174

386-589-5734
Web@DaySite.Net







Home | New To Websites | eCommerce | Web Hosting | Domain Name | HTML | Database | Programming | CGI | eMarketing | EMail | FTP

 
 
 

 

 


- Order Here -

Free
Domain Name Registration

With

Full Feature
Web Site Hosting

Just $15 a Mo.

Key Features
  Secure Servers
  Prof. Managers
  Personal Support
  Data Protection

Other Features
  Super Connectivity
  Ample Disk Space
  Extensive Email
  Spam Filters
  Virus Filters
  Web Site Stats
  CGI, Perl, PHP
  MySQL Database
  SSL Directory
  Free Domain Names

Call:
877-329-4839
(Toll Free)

eCommerce

FREE SSL

Secure Servers

Apache

Web Servers

MySQL Database Programming

Perl Database Programming

database programming

Since 1997

Domain Name Checker