• Home
  • Our Products
    • Domain Names
    • PPC Advertising
    • Performance Tracking
    • Website Development
    • Website Hosting
  • Special Web Pages
    • Content Manager
    • Database Directory
    • Email Distribution
    • Message Center
    • Motion Graphics
    • Organization Roster
    • PayPal Payment
    • Photo Album
    • Slideshow
    • Videos
  • Website Examples
    • $345.00 Website Samples
    • Cuevas Lumber & Fence
    • Doug McClellan Studio
    • Dr. Qin Acupuncture
    • Gillis Beach Bodysurfing Association
    • Phil Littman LMSW
    • SAT Corporation
    • Silicon Valley Trails
    • Wildwood General Building Contractor
    • Vacation Website
  • Email Voyager
  • Message Center
  • Contact Us
  • Design
    • HTML
    • Javascript
    • PHP
    • MySQL
    • JQuery

PHP Website Design

This web page is in development. Please be patient while we add new content.

PHP Applications

PHP is used to accomplish special tasks. Some PHP commands overlap JavaScript commands but that is for another more advanced discussion. Here are a very small list of applications allowed by the PHP capability.

  • PHP Mail: PHP use a mail() function to send email from a webpage. The mail function allows:multiple recipients, subjects, bcc, etc.
  • PHP Database Interface: PHP is used to communicate with a database. PHP ( or another server side language) is used to provide communication between an HTML form and a compatible database such as MySQL. When someone registers online -for example- using an HTML form, the information is sent from the form to the database using a combination of HTML and PHP. Again, this is not possible with HTML or JavaScript alone because these scripts can't send data to the server.
  • Include Function: PHP commands have an "include()" function that provides the ability to reuse PHP code anywhere. This valuable feature allows the programmer to reuse -for example- a menu on more than one webpage. This reduces programming time by allowing you to change the menu code on all the webpage by changing only the include() file.

Entering PHP results into your HTML environment.

PHP code has a simple way for the browser to display PHP results. By using the "echo" command you can easily put the PHP results into your HTML environment just as if you had typed it there. If you use "View Source" to look at your website code, you will see ownly your HTML code and none of the PHP code with one exception. You will also see any code that has been displayed via "echo".

Let's start with a simple example:

<html> (all your typical html code, meta tags etc. goes here)
<body>
<h1> Some html code</h1>
(None of the above is necessary to output your php code. It was put here for completeness.)


Now start your PHP code.

<?php
echo $someName="whatever you want to type";
?>
When you run this code your bowser will display "Whatever you want to type".

"echo" is the typical way for you to enter PHP results into your html program. For example:

<h1>Here is a heading
<h2><?php echo 'here is heading 2' ?> (Your browser will output this code just as if you had typed it.)
<h1>Here is heading 1
<h2>here is heading 2>

In summary: PHP "echo" puts a PHP variable into the HTML environment so it can be displayed by the browser. If you are familiar with how to deal with <forms> you might consider this comment. "et's create a variable called "$var1". $var1 might come from a <form> via a POST or GET.

For example: $var1=$_POST['somename'];.

But if you are not familiar with Forms and POST/GET, then just understand that somehow, $var1 ='some information' is created. You can now enter $var1 it into your <h2> tag (above) as follows:


<h2><?php echo $var1 ?> </h2>

------ Voyager Web Design: Saratoga, California: Ask for a Free Estimate.
Add us to your email list: getInfo@voyagerWD.com