php


How to embed this php code in html?


I decided to build a booking calendar and embed it to my website. But I don't know how to include it in the html file. I tried the <?php ?> tag but it doesn't display at all. I looked around and found this htaccess file thing. How do I generate it? Is it a way to use my php code without this?
Here is what included in my big html file (I did not include other html here)
<!DOCTYPE html>
<hmtl>
<head>
</head>
<body>
<?php
include 'calendar.php';
$calendar = new Calendar();
echo $calendar->show();
?>
</body>
</html>
I used sublime text edit and there is no "color" on the key words meaning it is not recognizing the php tag.
Place the php code of the calendar in a file and save it as say, calendar.php and then add the following line in the pages where you want the calendar to appear in:
<?php include("calendar.php"); ?>
N.B. Make sure to replace the file extension of all your html files with .php extension instead of the .html extension.
For example: index.html should be index.php

Related Links

access json object and array
406 “Not Acceptable” error when using JanRain OpenID Library with Google
How do we upload a file to mysql database using php
problem with comparing two arrays
Need help about array
Replacing a querystring parameter value using mod_rewrite
How to increase PHP over HTML speed?
Subcategories MySql and php
How to count torrent seeders and peers?
Type code in to a text input form, how?
Are there any alternatives to the MVC frameworks for PHP that would be considard best practice?
Delay when using PHP mail() function to send email through Exchange (using sendmail as a relay)
PHP 5 software as a commerical product
What's the most effective way to match out data from <table > with PHP?
Automatic opening of hyperlinks within received emails
what is a good approach in dealing with remote captcha validation in jquery?

Categories

HOME
user-interface
paypal-ipn
compilation
biztalk
fogbugz
amp
implicit-conversion
navigation
visualforce
minecraft
clickable-image
migrate
amazon-emr
xbox360
c#-7.0
scala-ide
parceler
error-logging
ratio
firemonkey-style
offline-caching
android-cardview
msdeploy
oracleforms
macromedia
tsung
javax.persistence
ms-media-foundation
markov-chains
char-pointer
numerics
grunt-contrib-watch
plane
hdiv
word-cloud
minikube
wysihtml5
directwrite
aws-kinesis-firehose
winston
mobile-angular-ui
lvalue
apache-modules
dynamics-crm-4
nrf51
nunit-console
mathml
dpkg
maven-release-plugin
groovyfx
vaadin4spring
swiffy
preferenceactivity
wso2ml
gql
supersocket.net
darwin
ocmockito
shoes
cakephp-2.2
adwords-apiv201402
ecos
prism.js
forceclose
sql-function
radius-protocol
iirf
mp4parser
quickgraph
ckeditor.net
jquery-dialog
popup-blocker
arrow
word-frequency
litespeed
digiflow
ognl
mongrel2
libxslt
eaccelerator
jdownloader
ppc
spring-modules
processors
twitter-feed
levels
service-factory

Resources

Database Users
RDBMS discuss
Database Dev&Adm
javascript
java
csharp
php
android
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App