Support Support Hosting Plans Reseller Dedicated Co-Located web Design F.A.Q Contact Us
Find this domain for me
No Hidden Charges, E-mail Forwarding, URL Forwarding, 24/7 Customer Service
Online Manual

Chapter Nineteen - PHP

What is PHP?
PHP (Hypertext Preprocessor) is a server-side HTML embedded scripting language that was developed in C and is designed especially for working with relational database systems. 

How do I set up a PHP Program?
A PHP program is embedded directly in the HTML document. It must have a .php4 extension in order for the server to look for PHP code in the document. Here is how you embed the PHP: 

     insert PHP code here

To merely display the information in your database without the use of a form to call a php script you simply create your HTML document as you would any other web page but instead of the extension of .htm or .html you need to name the file with the extension .php4. Then within the document itself the section that you'd like to be the PHP code, you begin it with . For instance: 
These are the products I sell:
<TABLE BORDER="0"> <? mysql_connect(localhost, username, password); $result = mysql(mydatabase, "select * from products"); $num = mysql_numrows($result); $i = 0; while($i < $num) { echo "<TR>n"; echo "<TD>n"; echo mysql_result($result,$i,"prodid"); echo "</TD>n<TD>"; echo mysql_result($result,$i,"name"); echo "</TD>n<TD>"; echo mysql_result($result,$i,"price"); echo "</TD>n"; echo "</TR>n"; $i++;} ?> </TABLE> 

For detailed information regarding PHP, you can go to their online manual:

Other useful sites include:

Technical Support
Online Manual
Control Panel
Our Network
Site Map
Free Tools
Advanced WHOIS
IP Location
  We accept: Visa, MasterCard and American Express
OnTimeHost.Com is an OnTimeHost, Inc. Company.
Copyright © 1999-2003 OnTimeHost, Inc. All Rights Reserved.