Page 1 of 1

Whats the difference?

Posted: Sun Oct 31, 2010 3:20 am
by nadeem14375
Dear all,

I am new to PHP.

here are 2 codes:

1. index.html
<body>
<?php
include("menu.php");
?>
<h1> Welcome to my page! </h1>
</body>

2. index.php
<body>
<?php
include("menu.php");
?>
<h1> Welcome to my page! </h1>
</body>

here is the menu.php

<html>
<body>
<a href="/mypage/index.html">Home</a>
<a href="/mypage/tutorials.php">Tutorials</a>
<a href="/mypage/references.php">References</a>
<a href="/mypage/examples.php">Examples</a>
<a href="/mypage/about.php">About Us</a>
<a href="/mypage/contact.php">Contact Us</a>

</body>
</html>

the index.php show the home , tutorials, references, examples, about and contacts us links when executed but the index.html don't show.

What's the difference in both and what the problem in index.html.

Regards:

Muhammad Nadeem

Re: Whats the difference?

Posted: Sun Oct 31, 2010 3:43 am
by amirbwb
muhammad HTML files don't accept php code:
so <?php ?> this code is not accepted by html files.
USE THIS ONLY IN PHP FILES.

////////////////////////////////
If your are making template ... create it in xhtml and than use PHP to make your website dynamic...

NSHALLAH TKOUN FHEMET =D

Re: Whats the difference?

Posted: Sun Oct 31, 2010 4:43 am
by nadeem14375
Dear amir bawab,

Thanks for your reply.

can you send me a sample of xhtml, or guide to a tutorial?

Regards:

Muhammad nadeem

Re: Whats the difference?

Posted: Mon Nov 01, 2010 11:41 am
by amirbwb
http://websitetips.com/articles/xhtml/basics/
http://net.tutsplus.com/

And try googling "a sample of xhtml" or "xhtml tutorial"...