HTML calling PHP; PHP returns result
| From: | Bob Sears | Date: | Wed, 18 Apr 2001 01:25:02 +0000 |
| Subject: | HTML calling PHP; PHP returns result | ||
| Groups: | php.windows | ||
| Request: | Send a blank email to php-windows+get-6808@lists.php.net to get a copy of this message | ||
I'm developing a reusable PHP hit counter. Is the following the correct way to accomplish this function?
This HTML module is in one directory ...
<html>
<body>
You are the
<? ../cgi-bin/counter.php?$App="xxx"?$Trailer="X"; ?>
visitor.
</body>
</html>
All the above does is calls counter.php with the application's name and whether a trailer is desired. It is supposed to
return "1st", "2nd", "3rd", "4th" ..... etc. to be displayed within the "You are ...." string.
This PHP module resides in cgi-bin ...
<?
// I am counter.php
do the file I/O stuff using $App and $Trailer
return $theresult
?>
All the above does is reads the application's hit counter file (creates one if not found) and sends the text back to the
calling HTML module.