The Andrew N. Wiggins Consultancy

Contact me at webmaster@anw.biz

Experimental Site

 

This site designed by Byg Software Ltd

 


 
1&1 WEBHOSTING
 

 

 

 
Frequently Asked Questions Overview Search Search
Overview :: 7. Advanced functions: PHP, mySQL, perl, ssh... :: PHP ::Article #2


 

How do I use PHP?


 

 

PHP is a scripting language that allows you to generate dynamic websites. PHP is short for "PHP Hypertext Preprocessor". Just like SSI PHP is directly integrated into the page source code. It is recoginized by the server by its file-extension of either php, php3 or php4.
A simple PHP-Script looks like this:
 

 

<html>
    <head>
    <title>My first PHP-Script</title>
    </head>
    <body>
    <?php

    echo "Hello World";
    echo "Today is ".date("d.m.Y");

    ?>
    </body>
    </html>


 


Her is another example which illustrates the use of variables in forms:
 

<html>
    <head>
    <title>PHP3 and forms</title>
    </head>
    <body>
    <?php
    if (isSet($eis)):
    echo "Your favourite ice-cream is $eis";
    exit;
    endif;
    ?>
    <form action="<? echo $PHP_SELF ?>" method="post">
    Your favourite ice-cream: <input type="text" name="eis" size="30" maxlength="30">

    <input type="submit" value="OK">
    <input type="reset" value="Reset">
    </form>


 




Please note that this will only work on the Linux Packages

TuxOnly!

 

Feedback
© 2003 1&1 WEBHOSTING