PDA

View Full Version : Php


eamo
02-11-2003, 07:30 PM
PHP is not working on my site, i wat 2 include something and it will not include it, It is the same code from my other site & it works fine there. It might because i only signed up 2day.

InTrKtEVO
02-12-2003, 05:13 AM
php doesnt work any better if you are signed up longer...


please post your error messages so we can help

eamo
03-17-2003, 07:29 AM
I know its been a wile since i posted but busy with exams!

Look at this i cant include in php
http://www.hostultra.com/~tazo/

majinvegeta
03-17-2003, 08:07 AM
why are you using things like left.php and top.php??? just make one file, main.php,put the layout there and links, but leave out the CONTENT. instead, put the php include code there, and then your set.

When you make the pages, don't use tags such <html> <head> <body> or <font> , if the layout is properly coded, it should be fine.

An example....
<center>My Page</center><br><br>Hello, this is my page, don't make fun of me!

thats all you would need to make the page as.

eamo
03-17-2003, 08:35 AM
For the content use some thing like this??
<?php
if ($page=="" or !isset($page))
{
$page="main";
}

// ##### main page ########
if ($page=="main")
{
echo " SOME TEXT HERE ";
include(" WEB ADDRESS Here");
}
?>

Peter Dodge
03-17-2003, 01:21 PM
What you want is

CODE

<html>
<body>

.
.
topbar/side bar code
.
.


<?php

#Get query string from the URL
# ie. index.php?mainpage.html
$query = $QUERY_STRING

# See if the page was specified in the URL
if ($query)
{
#Include the file from the query.
include($query);
}

# If it wasn't specified, load a default page.
# I used news.html, you can do whatever you need for your own
# site.
else
{
include("news.html");
}

?>


.
.
footer code
.
.

</body>
</html>

END CODE