FW: [PHP-DB] php,mysql,html question
| From: | Robert Hall | Date: | Wed, 26 Jul 2000 19:41:05 +0000 |
| Subject: | FW: [PHP-DB] php,mysql,html question | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-1539@lists.php.net to get a copy of this message | ||
Anything not in an XML tag is HTML, regardless of the file extension. You
can have a .php file with the following:
<?php $someVariable = "value" ?>
<Form Action="FileName.php" Method="Post">
The first line will execute as PHP and the second line will be treated as
HTML.
Webmonkey has a tutorial on using PHP with MySQL. Have a look at it and
you'll see how PHP and HTML are combined.
Bob Hall
-----Original Message-----
From: rusty@grunt.berkeley.edu [mailto:rusty@grunt.berkeley.edu]
Sent: Wednesday, July 26, 2000 3:21 PM
To: joanna@evilgeeks.com; php-db@lists.php.net
Subject: Re: [PHP-DB] php,mysql,html question
You need to use .php so that the web server feeds to the mod_php module
the .php file so that mod_php can execute the php code in it. You could
change things so that all files are given to the mod_php module to
interpret, so that you could use php code in .html files, but that
would slow down your web server (unless most of your .html files have
php code in them).
I haven't tried it yet but I think there's a way using Apache's
mod_rewrite to make the .php files look like .html files to the user.
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net
For additional commands, e-mail: php-db-help@lists.php.net
To contact the list administrators, e-mail: php-list-admin@lists.php.net