Jump to content

Recommended Posts

i have apache 2.2 and php 5.0 installed on my pc, i have a html page and i need to turn it into php and also i need to include a header and a footer, i tryed doing it but the webpage won't display, what am i doing wrong?

 

here is my page which i tryed turning into php

 

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">

<!--index.html is basically an introductory page to this website, this page introduce us to this website. This page tell us, this page is called index.html because that's the name of the first page on any website, this page tell us wat type of website this is, name of this website, name of the person(in this case that's me) who made it, a light description of what type of contents we will find inside this website etc. This page tell us the name of this lab assignment which is " -->

<head>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<title>INTN2201 - Lab 1</title><!--title of this page -->

<link href="./css/intn2201.css" rel="stylesheet" type="text/css" /></head>

 

<body>

<table border="1" >

<tr>

<td class="navmenu"><img src="images/my_logo.jpg" alt="My Logo" /></td>

<td class="page_header"><h1>INTN 2201: Lab Assignment 1: HTML Pages</h1></td>

</tr>

<tr>

 

    <td valign="top"> <a href="index.html" >MY HOME PAGE</a>

<br />

    <a href="lab1.html" >LAB 1:HTML Intro</a>

<br />

    <a href="lab2.html" >LAB 2:HTML Tables</a>

<br />

    <a href="lab3.html" >LAB 3:CSS Styles</a>

    </td>

 

<td class="main_body"><h2> Purpose of this website</h2>

<p class="p1"> This website was created for first lab assignment of <a href="http://opentech.durhamcollege.ca/~pufferd/intn2201">INTN2201</a>, <a href="http://opentech.durhamcollege.ca/~pufferd/intn2201">INTN2201</a>

is the course code for "INTERNET DEVELOPMENT I" course, at <a href="http://www.durhamcollege.ca">Durham College</a> every first year student<br/>

of Computer System Technology program(3 years) have to take this course, main purpose of this site is to get a first feel for creating a basic html website<br/>

 

but also to get a feel of how to use it in website creation, during the creation of this page i get to know programs like notepad++,<br/>

WINSCP, learned how to login to course webserver(opentech.durhamcollege.ca), another purpose for this site is to test webpage creator's( in this case that's me)<br/>

knowledle about HTML tags, XHTML, W3C validator, HTML stands for Hyper Text,it is not a programming language it is a Markup Language,<br/>

I(creater of this website) wanted to learn about differen't html tags and one of the best ways to learn about html tags is to try create<br/>

a html webpage. </p>

<hr/>

<h2>ol {

margin-left : 200px;

}

</h2>

<p class="p2"> in this style tag i used Margine properties to define a list in lab2.html, bottom of the page u will see lists, so margine basically sets all the margin properties in one declaration.</p>

<hr/>

 

<a href="http://www.durhamcollege.ca/"> <img width="300" src="images/durham_college_logo.jpg" alt="My Logo" /></a>

<hr/>

 

</td>

</tr>

<tr>

<td class="navmenu" colspan="2" align="right"> ©2011

 

<p>

 

                                <a href="http://validator.w3.org/check?uri=referer">

 

                                <img style="width:88px;

 

                                              height:31px;

 

                                              position:fixed;

 

                                              bottom: 81px;

 

                                              left:50px;"

 

                                      src="http://www.w3.org/Icons/valid-xhtml10"

 

                                      alt="Valid XHTML 1.0 Transitional" />

 

                        </a>

 

                        </p>

 

                <p>

 

                        <a href="http://jigsaw.w3.org/css-validator/check/referer">

 

                              <img style="width:88px;

 

                                              height:31px;

 

                                              position:fixed;

 

                                              bottom: 45px;

 

                                              left:50px;

 

                                              "

 

                                      src="http://jigsaw.w3.org/css-validator/images/vcss"

 

                                              alt="Valid CSS!" />

 

                                </a>

 

                </p></td>

     

</tr>

</table>

</body>

</html>

 

 

how do i turn this into php page and what goes in the header and footer?

Link to comment
https://forums.phpfreaks.com/topic/228228-how-do-i-turn-my-html-page-to-php/
Share on other sites

the instruction says i have to do the following:

 

 

# To ease web site maintenance you will pull the banner and nav bar off of your standardized pages, and place them in a file called "header.php"

# You will pull any bottom of the page and/or right side nav bar and place it in a file name "footer.php". This footer.php should include the XHTML and CSS validation images.

 

i am not sure wat part i need to edit and remove and put it in header or footer files.

ok sorry about that,

 

btw this my html page

 

 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<!--index.html is basically an introductory page to this website, this page introduce us to this website. This page tell us, this page is called index.html because that's the name of the first page on any website, this page tell us wat type of website this is, name of this website, name of the person(in this case that's me) who made it, a light description of what type of contents we will find inside this website etc. This page tell us the name of this lab assignment which is " -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>INTN2201 - Lab 1</title><!--title of this page -->
<link href="./css/intn2201.css" rel="stylesheet" type="text/css" /></head>

<body>
<table border="1" >
<tr>
<td class="navmenu"><img src="images/my_logo.jpg" alt="My Logo" /></td>
<td class="page_header"><h1>INTN 2201: Lab Assignment 1: HTML Pages</h1></td>
</tr>
<tr>

    <td valign="top"> <a href="index.html" >MY HOME PAGE</a>
<br />
    <a href="lab1.html" >LAB 1:HTML Intro</a>
<br />
    <a href="lab2.html" >LAB 2:HTML Tables</a>
<br />
    <a href="lab3.html" >LAB 3:CSS Styles</a>
    </td>

<td class="main_body"><h2> Purpose of this website</h2>
<p class="p1"> This website was created for first lab assignment of <a href="http://opentech.durhamcollege.ca/~pufferd/intn2201">INTN2201</a>, <a href="http://opentech.durhamcollege.ca/~pufferd/intn2201">INTN2201</a>
is the course code for "INTERNET DEVELOPMENT I" course, at <a href="http://www.durhamcollege.ca">Durham College</a> every first year student<br/>
of Computer System Technology program(3 years) have to take this course, main purpose of this site is to get a first feel for creating a basic html website<br/>

but also to get a feel of how to use it in website creation, during the creation of this page i get to know programs like notepad++,<br/>
WINSCP, learned how to login to course webserver(opentech.durhamcollege.ca), another purpose for this site is to test webpage creator's( in this case that's me)<br/>
knowledle about HTML tags, XHTML, W3C validator, HTML stands for Hyper Text,it is not a programming language it is a Markup Language,<br/>
I(creater of this website) wanted to learn about differen't html tags and one of the best ways to learn about html tags is to try create<br/>
a html webpage. </p>
<hr/>
<h2>ol {
margin-left : 200px;
}
</h2>
<p class="p2"> in this style tag i used Margine properties to define a list in lab2.html, bottom of the page u will see lists, so margine basically sets all the margin properties in one declaration.</p>
<hr/>

<a href="http://www.durhamcollege.ca/"> <img width="300" src="images/durham_college_logo.jpg" alt="My Logo" /></a>
<hr/>

</td>
</tr>
<tr>
<td class="navmenu" colspan="2" align="right"> ©2011

<p>

                                <a href="http://validator.w3.org/check?uri=referer">

                                <img style="width:88px;

                                               height:31px;

                                               position:fixed;

                                               bottom: 81px;

                                               left:50px;"

                                       src="http://www.w3.org/Icons/valid-xhtml10"

                                       alt="Valid XHTML 1.0 Transitional" />

                        </a>

                        </p>

                <p>

                        <a href="http://jigsaw.w3.org/css-validator/check/referer">

                               <img style="width:88px;

                                               height:31px;

                                               position:fixed;

                                               bottom: 45px;

                                               left:50px;

                                               "

                                       src="http://jigsaw.w3.org/css-validator/images/vcss"

                                               alt="Valid CSS!" />

                                </a>

                </p></td>
       
</tr>
</table>
</body>
</html>

 

this is wat i did to turn it into php

 

header.php

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> 
<!--index.html is basically an introductory page to this website, this page introduce us to this website. This page tell us, this page is called index.html because that's the name of the first page on any website, this page tell us wat type of website this is, name of this website, name of the person(in this case that's me) who made it, a light description of what type of contents we will find inside this website etc. This page tell us the name of this lab assignment which is " -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 
<title>Rahat Amin INTN2201 - Lab 1</title><!--title of this page -->
<link href="./css/intn2201.css" rel="stylesheet" type="text/css" /></head>

<body>
<table border="1" >
<tr>
<td class="navmenu"><img src="images/my_logo.jpg" alt="My Logo" /></td>
<td class="page_header"><h1>INTN 2201: Lab Assignment 1: HTML Pages</h1></td>
</tr>
<tr>

    <td valign="top"> <a href="index.html" >MY HOME PAGE</a>
<br />
    <a href="lab1.html" >LAB 1:HTML Intro</a>
<br />
    <a href="lab2.html" >LAB 2:HTML Tables</a>
<br />
    <a href="lab3.html" >LAB 3:CSS Styles</a>
    </td>

 

footer.php

<hr/>

<a href="http://www.durhamcollege.ca/"> <img width="300" src="images/durham_college_logo.jpg" alt="My Logo" /></a>
<hr/>

</td>
</tr>
<tr>
<td class="navmenu" colspan="2" align="right"> ©2011 

<p>

                                <a href="http://validator.w3.org/check?uri=referer">

                                <img style="width:88px;

                                               height:31px;

                                               position:fixed;

                                               bottom: 81px;

                                               left:50px;"

                                       src="http://www.w3.org/Icons/valid-xhtml10"

                                       alt="Valid XHTML 1.0 Transitional" />

                        </a>

                        </p>

                <p>

                        <a href="http://jigsaw.w3.org/css-validator/check/referer">

                               <img style="width:88px;

                                               height:31px;

                                               position:fixed;

                                               bottom: 45px;

                                               left:50px;

                                               "

                                       src="http://jigsaw.w3.org/css-validator/images/vcss"

                                               alt="Valid CSS!" />

                                </a>

                </p></td>
       
</tr>
</table>
</body>
</html>

 

and this is my main page index.php

<td class="main_body"><h2> Purpose of this website</h2>
<p class="p1"> This website was created for first lab assignment of <a href="http://opentech.durhamcollege.ca/~pufferd/intn2201">INTN2201</a>, <a href="http://opentech.durhamcollege.ca/~pufferd/intn2201">INTN2201</a>
is the course code for "INTERNET DEVELOPMENT I" course, at <a href="http://www.durhamcollege.ca">Durham College</a> every first year student<br/>
of Computer System Technology program(3 years) have to take this course, main purpose of this site is to get a first feel for creating a basic html website<br/>

but also to get a feel of how to use it in website creation, during the creation of this page i get to know programs like notepad++,<br/>
WINSCP, learned how to login to course webserver(opentech.durhamcollege.ca), another purpose for this site is to test webpage creator's( in this case that's me)<br/>
knowledle about HTML tags, XHTML, W3C validator, HTML stands for Hyper Text,it is not a programming language it is a Markup Language,<br/>
I(creater of this website) wanted to learn about differen't html tags and one of the best ways to learn about html tags is to try create<br/>
a html webpage. </p>
<hr/>
<h2>ol {
margin-left : 200px;
}
</h2>
<p class="p2"> in this style tag i used Margine properties to define a list in lab2.html, bottom of the page u will see lists, so margine basically sets all the margin properties in one declaration.</p>
<hr/>

<a href="http://www.durhamcollege.ca/"> <img width="300" src="images/durham_college_logo.jpg" alt="My Logo" /></a>

 

But when i try to load index.php on browser, it says page can't be found...

 

 

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.