--- In datingscripts@yahoogroups.com, "Feed Back" <the_tallest@h...>
wrote:
>
> hi my teachers
> my question is how i can incloud a php page in a html page i
> wanna make a vote in my html page i have php code what is the method to
> make this ??
> thanks alot
>
Hello,
1. visit http://php.net (the main page of php) where you'll find a
wealth of tutorials, links, howto s etc.
2. php code can be embedded easily within HTML example:
<html>
<head>
<title>
<?
/* This is where the server attempts to process php code
As long as your page's suffix ends with .php, the server will then
attempt to parse any statements the begin with '<?' and end with '?>'.
Here, the variable '$Sitename has been assigned to a string and when
parsed replaces the variable with the string:
$Sitename = "My Site Name". // typically in a separate config.php or
vars.php which would added to the top of this page:
<?
include ("config.php");
include ("vars.php");
?>
$sitename
?> // tells the server to stop parsing code.
</title>
</head>
<body>
<?
/* Here you have the server parse your 'main.php' file and insert it
within this page. It might not necessarily contain much (if any) php
code and simply act as an 'include'. */
include ("main.php");
?>
<p> </p>
<!--begin more content -->
<!--begin footer -->
<?
/* This is where you'll have the server parse the contents that
comprises our footer and insert it in the following statement within
you HTML page: */
include ("footer.php");
?>
</body>
</html>
-------
This is off the top of my head and rough. Hopefully it provides an
idea of where I was going with this. There is so much you can do with
the language besides basic includes.
-cheers