cloudy

Author Topic: Html, Java or php for dated file retrieval - Form Select?  (Read 4975 times)

0 Members and 2 Guests are viewing this topic.

Online TNETWeather

  • Kevin Reed (KrelvinAZ)
  • Global Moderator
  • Posts: 5,865
  • Gremlins are at work...
  • Mesa, AZ
    • TNET Weather Station - Mesa AZ
Re: Html, Java or php for dated file retrieval - Form Select?
« Reply #15 on: November 12, 2007, 04:25:59 PM »
For starters this is a bit redundant since you are in PHP mode why not just include it...

Remove:
Code: [Select]
echo '<?php include("vejrdata/testtags.php"); ?>
Change to:

Code: [Select]
include("vejrdata/testtags.php");

Second... Isn't this already in your top.php file??  Why would you include it twice??

Code: [Select]
--------------------------------------------
<!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="dk" lang="dk">
  <head>
    <meta http-equiv="content-type" content="application/xhtml+xml; charset=ISO-8859-1" />
    <meta name="author" content="Vejret på Buskelundtoften" />
    <meta name="generator" content="author" />
    <link rel="stylesheet" type="text/css" href="http://www.buskelundtoften.dk/vejret/css/sinorca-screen.css" media="screen" title="Sinorca (screen)" />
    <link rel="stylesheet" type="text/css" href="http://www.buskelundtoften.dk/vejret/css/sinorca-print.css" media="print" />
<script type="text/javascript" src="http://www.buskelundtoften.dk/vejret/ajax-images/ajaxWDwx.js"></script>
    <script type="text/javascript" src="http://www.buskelundtoften.dk/vejret/ajax-images/ajaxgizmo.js"></script>
    <script type="text/javascript">useKnots = false;ajax_set_units('M');</script>
    <title> Vejret på Buskelundtoften - test</title>
  </head>
  <body>
<script type="text/javascript" src="http://www.buskelundtoften.dk/stat/track.php?mode=js"></script><noscript><img src="http://wwww.buskelundtoften.dk/stat/track_noscript.php" border="0" alt="" width="1" height="1" /></noscript>
------------------------------------------------------

So a closer to what you need would be...

Code: [Select]
<?php ...

function 
html_start() {
    include(
"vejrdata/testtags.php");
    
$TITLE "Page title to display";
    
$CURPAGE basename(  $_SERVER['PHP_SELF'] ); 
    include(
"top.php");
    
$doInclude true;
    include(
"menu.php");
}


All you need is Time, Aptitude and Desire ... and you can build just about anything...

Offline jwwd

  • Posts: 3,561
  • Silkeborg, Denmark (56:10:58 N-09:30:26 E) - Elevation 75,35 meters
    • Weather at Silkeborg, Denmark
Re: Html, Java or php for dated file retrieval - Form Select?
« Reply #16 on: November 12, 2007, 05:23:23 PM »
Hi Kevin

Thanks for your quick reply.

You got me going a bit further.

Unfortunately I dont have this code in my top - but in my mainpage - so it has to be in your scriptsfile.
Code: [Select]
<!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="dk" lang="dk">
  <head>
    <meta http-equiv="content-type" content="application/xhtml+xml; charset=ISO-8859-1" />
    <meta name="author" content="Vejret på Buskelundtoften" />
    <meta name="generator" content="author" />
    <link rel="stylesheet" type="text/css" href="http://www.buskelundtoften.dk/vejret/css/sinorca-screen.css" media="screen" title="Sinorca (screen)" />
    <link rel="stylesheet" type="text/css" href="http://www.buskelundtoften.dk/vejret/css/sinorca-print.css" media="print" />
<script type="text/javascript" src="http://www.buskelundtoften.dk/vejret/ajax-images/ajaxWDwx.js"></script>
    <script type="text/javascript" src="http://www.buskelundtoften.dk/vejret/ajax-images/ajaxgizmo.js"></script>
    <script type="text/javascript">useKnots = false;ajax_set_units('M');</script>
    <title> Vejret på Buskelundtoften - test</title>
  </head>
  <body>
<script type="text/javascript" src="http://www.buskelundtoften.dk/stat/track.php?mode=js"></script><noscript><img src="http://wwww.buskelundtoften.dk/stat/track_noscript.php" border="0" alt="" width="1" height="1" /></noscript>
------------------------------------------------------
I almost have the most of the code above working - but the following lines are not working:
    <script type="text/javascript">useKnots = false;ajax_set_units('M');</script>
<script type="text/javascript" src="http://www.buskelundtoften.dk/stat/track.php?mode=js"></script><noscript><img src="http://wwww.buskelundtoften.dk/stat/track_noscript.php" border="0" alt="" width="1" height="1" /></noscript>

Thanks for all your help.

Best regards,

Henrik

Online TNETWeather

  • Kevin Reed (KrelvinAZ)
  • Global Moderator
  • Posts: 5,865
  • Gremlins are at work...
  • Mesa, AZ
    • TNET Weather Station - Mesa AZ
Re: Html, Java or php for dated file retrieval - Form Select?
« Reply #17 on: November 12, 2007, 05:50:50 PM »
So... what is in your top.php file?




All you need is Time, Aptitude and Desire ... and you can build just about anything...

Offline jwwd

  • Posts: 3,561
  • Silkeborg, Denmark (56:10:58 N-09:30:26 E) - Elevation 75,35 meters
    • Weather at Silkeborg, Denmark
Re: Html, Java or php for dated file retrieval - Form Select?
« Reply #18 on: November 12, 2007, 05:56:35 PM »
Hi Kevin

My top.php :

Code: [Select]
<?php
global
$TITLE$CURPAGE;
?>

<div id="header">
  <div class="superHeader">
    <div class="left">Solopgang: <?php echo $sunrise?> - Solnedgang: <?php echo $sunset?>|Månen
op: <?php echo $moonrise?> - Månen ned: <?php echo $moonset?></div>
    <div class="right"><a target="_top" href="http://<?=$_SERVER['SERVER_NAME'];?>/vejret/<?=$CURPAGE;?>">|<img border="0" src="http://www.buskelundtoften.dk/vejret/billeder/dk.gif" width="16" height="10" alt="" /></a>|<a target="_top" href="http://<?=$_SERVER['SERVER_NAME'];?>/vejret/english/<?=$CURPAGE;?>"><img border="0" src="http://www.buskelundtoften.dk/vejret/billeder/uk.gif" width="16" height="10" alt="" /></a>|<a target="_blank" href="vejrudsigt/plaintext-rss.php"><img border="0" src="css/rss.gif" width="36" height="14" alt="" /></a>|<a href="banner.php">Bannere</a>|<a href="om.php">Om
Vejret på Buskelundtoften</a></div>
  </div>
    <div class="midHeader"><h1 class="headerTitle" align="center">
<a href="http://www.buskelundtoften.dk/vejret/">
<img border="0" src="http://www.buskelundtoften.dk/vejret/billeder/buskelundtoften-logo-100x100-danish.png" align="left" width="100" height="100" alt="Logo for Vejret på Buskelundtoften" /><img border="0" src="http://www.buskelundtoften.dk/vejret/billeder/buskelundtoften-banner-500x93-danish.png" width="500" height="97" alt="Banner for Vejret på Buskelundtoften" /></a></h1></div>
    <div class="midHeaderTemp"><font color="#274E90"><span class="ajax" id="ajaxbigtemp">
%temp%</span></font></div>
</div>
<div class="subHeader">
    <a title="Vejret på Buskelundtoften" target="_blank" href="http://www.buskelundtoften.dk">
Buskelundtoften, Silkeborg</a>&nbsp;|
    <a class="highlight" href="oversigt.php">56°10'58''N&nbsp;&nbsp;9°30'26''Ø</a> | Højde over havet: 75,35 meter
<div class="right">
<span class="ajax" id="ajaxindicator">Opdateret</span>:
<span class="ajax" id="ajaxdate">%date%</span> kl.
<span class="ajax" id="ajaxtime">%time%</span><br/><img src="./ajax-images/spacer.gif" height="14" width="1" alt=" " />
<span class="ajaxcontent0" style="display: none">
<span class="ajax" id="ajaxcurrentcond"></span></span>
<span class="ajaxcontent1" style="display: none">Temperatur:
<span class="ajax" id="ajaxtemp"></span>
<span class="ajax" id="ajaxtemparrow"></span>&nbsp;
<span class="ajax" id="ajaxtemprate"></span> /timen</span>
<span class="ajaxcontent2" style="display: none">Fugtighed:
<span class="ajax" id="ajaxhumidity"></span>%</span>
<span class="ajaxcontent3" style="display: none">Dugpunkt:
<span class="ajax" id="ajaxdew"></span></span>
<span class="ajaxcontent4" style="display: none">Vind:
<span class="ajax" id="ajaxwindicon"></span>
<span class="ajax" id="ajaxwinddir"></span>&nbsp;
<span class="ajax" id="ajaxwind"></span></span>
<span class="ajaxcontent5" style="display: none">Vindstød:
<span class="ajax" id="ajaxgust"></span></span>
<span class="ajaxcontent6" style="display: none">Barometer:
<span class="ajax" id="ajaxbaro"></span>
<span class="ajax" id="ajaxbaroarrow"></span>&nbsp;
<span class="ajax" id="ajaxbarotrendtext"></span>&nbsp;
<span class="ajax" id="ajaxbarotrend"></span>/timen</span>
<span class="ajaxcontent7" style="display: none">Regn i dag:
<span class="ajax" id="ajaxrain"></span></span>
<span class="ajaxcontent8" style="display: none">UV-index:
<span class="ajax" id="ajaxuv"></span>&nbsp;<span style="color: #0099FF"><strong>
<span class="ajax" id="ajaxuvword"></span></strong></span></span>
  </div>
</div>

Online TNETWeather

  • Kevin Reed (KrelvinAZ)
  • Global Moderator
  • Posts: 5,865
  • Gremlins are at work...
  • Mesa, AZ
    • TNET Weather Station - Mesa AZ
Re: Html, Java or php for dated file retrieval - Form Select?
« Reply #19 on: November 12, 2007, 06:30:36 PM »

Part of the problem is that the JavaScript stuff does not work well when you output it via echo (or print).  It is best to be simply in an html portion of the code like between:

?>
whatever java script you want
<?php

Also, if you use the same HTML top section of code it is much easier adding it to a file you can include so that any change you want to make to it can be done in one file for all pages.

Code: [Select]
<?php
##############################################################################
# HTML_top.php 
# Contains the top most section of the HTML code output by the pages
##############################################################################

global  $TITLE;
?>

<!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="dk" lang="dk">
<head>
    <meta http-equiv="content-type"
        content="application/xhtml+xml; charset=ISO-8859-1" />
    <meta name="author" content="Vejret på Buskelundtoften" />
    <meta name="generator" content="author" />
    <link rel="stylesheet" type="text/css"
        href="http://www.buskelundtoften.dk/vejret/css/sinorca-screen.css"
        media="screen" title="Sinorca (screen)" />
    <link rel="stylesheet" type="text/css"
        href="http://www.buskelundtoften.dk/vejret/css/sinorca-print.css"
        media="print" />
    <script type="text/javascript"
        src="http://www.buskelundtoften.dk/vejret/ajax-images/ajaxWDwx.js"></script>
    <script type="text/javascript"
        src="http://www.buskelundtoften.dk/vejret/ajax-images/ajaxgizmo.js"></script>
    <script type="text/javascript">useKnots = false;ajax_set_units('M');</script>
    <title><?php echo $TITLE?></title>
</head>
<body>
<script type="text/javascript"
    src="http://www.buskelundtoften.dk/stat/track.php?mode=js"></script>
<noscript>
    <img src="http://wwww.buskelundtoften.dk/stat/track_noscript.php"
        border="0" alt="" width="1" height="1" />
</noscript>
<?php
##############################################################################
# END of HTML_top.php
##############################################################################

Then you could use...

Code: [Select]
<?php ...


function 
html_start() {
    include(
"vejrdata/testtags.php");
    
$TITLE "Page title to display";
    
$CURPAGE basename(  $_SERVER['PHP_SELF'] );
    include(
"HTML_top.php"); 
    include(
"top.php");
    
$doInclude true;
    include(
"menu.php");
}

Which now includes the HTML_top.php module.

All you need is Time, Aptitude and Desire ... and you can build just about anything...

Offline jwwd

  • Posts: 3,561
  • Silkeborg, Denmark (56:10:58 N-09:30:26 E) - Elevation 75,35 meters
    • Weather at Silkeborg, Denmark
Re: Html, Java or php for dated file retrieval - Form Select?
« Reply #20 on: November 16, 2007, 03:47:35 PM »
Hi Kevin

Thanks - I am now working on changing my site with the code you suggest - but I have a problem.

Here is the 3 files:

HTML_top.php:
Code: [Select]
<?php
##############################################################################
# HTML_top.php 
# Contains the top most section of the HTML code output by the pages
##############################################################################

global  $TITLE;
?>

<!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="dk" lang="dk">
<head>
    <meta http-equiv="content-type"
        content="application/xhtml+xml; charset=ISO-8859-1" />
    <meta name="author" content="Vejret på Buskelundtoften" />
    <meta name="generator" content="author" />
    <link rel="stylesheet" type="text/css"
        href="sinorca-screen.css"
        media="screen" title="Sinorca (screen)" />
    <link rel="stylesheet" type="text/css"
        href="http://www.buskelundtoften.dk/vejret/css/sinorca-print.css"
        media="print" />
    <script type="text/javascript"
        src="http://www.buskelundtoften.dk/vejret/ajax-images/ajaxWDwx.js"></script>
    <script type="text/javascript"
        src="http://www.buskelundtoften.dk/vejret/ajax-images/ajaxgizmo.js"></script>
    <script type="text/javascript">useKnots = false;ajax_set_units('M');</script>
    <title>&lt;?php echo $TITLE; ?&gt;</title>
</head>
<body>
<script type="text/javascript"
    src="http://www.buskelundtoften.dk/stat/track.php?mode=js"></script>
<noscript>
    <img src="http://wwww.buskelundtoften.dk/stat/track_noscript.php"
        border="0" alt="" width="1" height="1" />
</noscript>
<?php
##############################################################################
# END of HTML_top.php
##############################################################################

top.php:

Code: [Select]
<div id="header">
  <div class="superHeader">
    <div class="left">Solopgang: <?php echo $sunrise?> - Solnedgang: <?php echo $sunset?>|Månen
op: <?php echo $moonrise?> - Månen ned: <?php echo $moonset?></div>
    <div class="right"><a target="_top" href="http://<?=$_SERVER['SERVER_NAME'];?>/vejret/<?=$CURPAGE;?>">
|<img border="0" src="http://www.buskelundtoften.dk/vejret/billeder/dk.gif" width="16" height="10" alt="" /></a>|<a target="_top" href="http://<?=$_SERVER['SERVER_NAME'];?>/vejret/english/<?=$CURPAGE;?>"><img border="0" src="http://www.buskelundtoften.dk/vejret/billeder/uk.gif" width="16" height="10" alt="" /></a>|<a target="_blank" href="vejrudsigt/plaintext-rss.php"><img border="0" src="css/rss.gif" width="36" height="14" alt="" /></a>|<a href="banner.php">Bannere</a>|<a href="om.php">Om
Vejret på Buskelundtoften</a></div>
  </div>
    <div class="midHeader"><h1 class="headerTitle" align="center">
<a href="http://www.buskelundtoften.dk/vejret/">
<img border="0" src="http://www.buskelundtoften.dk/vejret/billeder/buskelundtoften-logo-100x100-danish.png" align="left" width="100" height="100" alt="Logo for Vejret på Buskelundtoften" /><img border="0" src="http://www.buskelundtoften.dk/vejret/billeder/buskelundtoften-banner-500x93-danish.png" width="500" height="97" alt="Banner for Vejret på Buskelundtoften" /></a></h1></div>
    <div class="midHeaderTemp"><font color="#274E90"><span class="ajax" id="ajaxbigtemp">
%temp%</span></font></div>
</div>
<div class="subHeader">
    <a title="Vejret på Buskelundtoften" target="_blank" href="http://www.buskelundtoften.dk">
Buskelundtoften, Silkeborg</a>&nbsp;|
    <a class="highlight" href="oversigt.php">56°10'58''N&nbsp;&nbsp;9°30'26''Ø</a> | Højde
over havet: 75,35 meter
<div class="right">
<span class="ajax" id="ajaxindicator">Opdateret</span>:
<span class="ajax" id="ajaxdate">%date%</span> kl.
<span class="ajax" id="ajaxtime">%time%</span><br/><img src="./ajax-images/spacer.gif" height="14" width="1" alt=" " />
<span class="ajaxcontent0" style="display: none">
<span class="ajax" id="ajaxcurrentcond"></span></span>
<span class="ajaxcontent1" style="display: none">Temperatur:
<span class="ajax" id="ajaxtemp"></span>
<span class="ajax" id="ajaxtemparrow"></span>&nbsp;
<span class="ajax" id="ajaxtemprate"></span> /timen</span>
<span class="ajaxcontent2" style="display: none">Fugtighed:
<span class="ajax" id="ajaxhumidity"></span>%</span>
<span class="ajaxcontent3" style="display: none">Dugpunkt:
<span class="ajax" id="ajaxdew"></span></span>
<span class="ajaxcontent4" style="display: none">Vind:
<span class="ajax" id="ajaxwindicon"></span>
<span class="ajax" id="ajaxwinddir"></span>&nbsp;
<span class="ajax" id="ajaxwind"></span></span>
<span class="ajaxcontent5" style="display: none">Vindstød:
<span class="ajax" id="ajaxgust"></span></span>
<span class="ajaxcontent6" style="display: none">Barometer:
<span class="ajax" id="ajaxbaro"></span>
<span class="ajax" id="ajaxbaroarrow"></span>&nbsp;
<span class="ajax" id="ajaxbarotrendtext"></span>&nbsp;
<span class="ajax" id="ajaxbarotrend"></span>/timen</span>
<span class="ajaxcontent7" style="display: none">Regn i dag:
<span class="ajax" id="ajaxrain"></span></span>
<span class="ajaxcontent8" style="display: none">UV-index:
<span class="ajax" id="ajaxuv"></span>&nbsp;<span style="color: #0099FF"><strong>
<span class="ajax" id="ajaxuvword"></span></strong></span></span>
  </div>
</div>

test.php:

Code: [Select]
<?php
function html_start() {
    include(
"vejrdata/testtags.php");
    
$TITLE "Page title to display";
    
$CURPAGE basename(  $_SERVER['PHP_SELF'] );
    include(
"HTML_top.php"); 
    include(
"top.php");
    
$doInclude true;
    include(
"menu.php");
}
<
div id="main-copy">
<
h1 id="radar">TEST</h1>
<
p>&nbsp;</p>
<
p>&nbsp;</p>
<
p>&nbsp;</p>
<
p>&nbsp;</p>
<
p>&nbsp;</p>
<
p>&nbsp;</p>
<
p>&nbsp;</p>
</
div>
<?
php
$doInclude 
true;
include(
"bundtekst.php"); ?>

 </body>
</html>

But its not working - what can be the problem?

Best regards,

Henrik

Online TNETWeather

  • Kevin Reed (KrelvinAZ)
  • Global Moderator
  • Posts: 5,865
  • Gremlins are at work...
  • Mesa, AZ
    • TNET Weather Station - Mesa AZ
Re: Html, Java or php for dated file retrieval - Form Select?
« Reply #21 on: November 16, 2007, 04:04:08 PM »

Taken out of context it is difficult to know what you mean by "But its not working - what can be the problem?"

What is not working. The page at all?, JavaScript, Validation?

While having access to the source is helpful, it is hard to just peer at the code to figure out what you are having problems with.

All you need is Time, Aptitude and Desire ... and you can build just about anything...

Offline jwwd

  • Posts: 3,561
  • Silkeborg, Denmark (56:10:58 N-09:30:26 E) - Elevation 75,35 meters
    • Weather at Silkeborg, Denmark
Re: Html, Java or php for dated file retrieval - Form Select?
« Reply #22 on: November 16, 2007, 05:36:55 PM »
Hi Kevin

Thanks again for your reply.

Sorry - here is a link to the page where I include HTML_top.php, 1top.php, menu.php and bundtekst.php

www.buskelundtoften.dk/vejret/1test.php

Im really glad that you offer your help - its big value for me and I learn something new all the time.

Best regards,

Henrik

Ps. I have attached all the files at .txt files. (except 1menu.php)

Offline jwwd

  • Posts: 3,561
  • Silkeborg, Denmark (56:10:58 N-09:30:26 E) - Elevation 75,35 meters
    • Weather at Silkeborg, Denmark
Re: Html, Java or php for dated file retrieval - Form Select?
« Reply #23 on: November 17, 2007, 09:33:07 AM »
Hi Kevin

I think its something about my 1test.php that is wrong.

I do not know how to include the HTML_top.php, top.php etc.

Here is what i have done to my 1test.php: (www.buskelundtoften.dk/vejret/1test.php)

Code: [Select]
<?php

function html_start() {
    include(
"vejrdata/testtags.php");
    
$TITLE "Page title to display";
    
$CURPAGE basename(  $_SERVER['PHP_SELF'] );
    include(
"1HTML_top.php"); 
    include(
"1top.php");
    
$doInclude true;
    include(
"1menu.php");
}
<
div id="main-copy">
<
h1 id="radar">TEST</h1>
Here is the main text.
</
div>
$doInclude true;
include(
"1bundtekst.php");
?>

Best regards,

Henrik


Online TNETWeather

  • Kevin Reed (KrelvinAZ)
  • Global Moderator
  • Posts: 5,865
  • Gremlins are at work...
  • Mesa, AZ
    • TNET Weather Station - Mesa AZ
Re: Html, Java or php for dated file retrieval - Form Select?
« Reply #24 on: November 17, 2007, 05:17:42 PM »
Your webserver is configured for development mode which means you can easily see the error (or at least I'm seing it)..

Parse error: syntax error, unexpected '<' in E:\vhosts\buskelundtoften.dk\httpdocs\vejret\1test.php on line 12

Not sure what you are really trying to do in this code...

Code: [Select]
<?php

function html_start() {
    include(
"vejrdata/testtags.php");
    
$TITLE "Page title to display";
    
$CURPAGE basename(  $_SERVER['PHP_SELF'] );
    include(
"1HTML_top.php"); 
    include(
"1top.php");
    
$doInclude true;
    include(
"1menu.php");
}
<
div id="main-copy">
<
h1 id="radar">TEST</h1>
Here is the main text.
</
div>
$doInclude true;
include(
"1bundtekst.php");
?>

The error is due to the line:

<div id="main-copy">

Because you start out in PHP mode, but then switch to HTML mode without telling the server you are doing so.  However, I'm not sure what you are doing with the function, since you are not actually calling it.

You have to think of PHP code inside a web page as being switched on  <?php   and switched off  ?>.

When it is on, you are in PHP mode so what you enter is PHP code, NOT HTML code.  When it is switched off, you are then back to native HTML mode.

In PHP mode you can output HTML by using print, or echo like:

echo '<table><tr><td>Apples</td><td>Pears</td><td>Plumbs</td></tr></table>';

You can insert PHP code while in HTML mode by simply switching like:

<?php
$TITLE="1234"
?>
<h1><?php echo $TITLE; ?></h1>
...


Which started in PHP mode, set the Variable $TITLE, switched to HTML mode and then echo'd the variable in PHP between the two HTML <h1> tags...

So, back to your code segment....  You could do it like the following (I give you several variations of the same thing to show there are options on how to do the same thing)...

Dont use the function at all and use echo to output the HTML:
Code: [Select]
<?php

include("vejrdata/testtags.php");
$TITLE "Page title to display";
$CURPAGE basename(  $_SERVER['PHP_SELF'] );
include(
"1HTML_top.php"); 
include(
"1top.php");
$doInclude true;
include(
"1menu.php");

echo 
'<div id="main-copy">
<h1 id="radar">TEST</h1>
Here is the main text.
</div>'
;

$doInclude true;
include(
"1bundtekst.php");
...

Or... Dont use the function and switch to HTML mode to output the small amount of HTML

Code: [Select]
<?php

include("vejrdata/testtags.php");
$TITLE "Page title to display";
$CURPAGE basename(  $_SERVER['PHP_SELF'] );
include(
"1HTML_top.php"); 
include(
"1top.php");
$doInclude true;
include(
"1menu.php");

?>

<div id="main-copy">
<h1 id="radar">TEST</h1>
Here is the main text.
</div>
<?php
$doInclude 
true;
include(
"1bundtekst.php");
...

Or... Use the function, but then you need to call it...

Code: [Select]
<?php

function html_start() {
    include(
"vejrdata/testtags.php");
    
$TITLE "Page title to display";
    
$CURPAGE basename(  $_SERVER['PHP_SELF'] );
    include(
"1HTML_top.php"); 
    include(
"1top.php");
    
$doInclude true;
    include(
"1menu.php");
}

html_start();
<?
<
div id="main-copy">
<h1 id="radar">TEST</h1>
Here is the main text.
</
div>
<?
php
$doInclude 
true;
include(
"1bundtekst.php");
...


Hopefully that will give you some ideas of how you can do it.



All you need is Time, Aptitude and Desire ... and you can build just about anything...

Offline jwwd

  • Posts: 3,561
  • Silkeborg, Denmark (56:10:58 N-09:30:26 E) - Elevation 75,35 meters
    • Weather at Silkeborg, Denmark
Re: Html, Java or php for dated file retrieval - Form Select?
« Reply #25 on: November 17, 2007, 06:31:45 PM »
Hi Kevin

Thank you very very much - that sorted some things out for me.

Just one problem left - the page title dont seem to work. What can be the problem?

www.buskelundtoften.dk/vejret/1test.php

Code:

Code: [Select]
<?php

include("vejrdata/testtags.php");
$TITLE "TEST TITLE";
$CURPAGE basename(  $_SERVER['PHP_SELF'] );
include(
"1HTML_top.php"); 
include(
"1top.php");
$doInclude true;
include(
"1menu.php");

?>

<div id="main-copy">
<h1 id="radar">TEST</h1>
Here is the main text.
</div>
<?php
$doInclude 
true;
include(
"1bundtekst.php");

Online TNETWeather

  • Kevin Reed (KrelvinAZ)
  • Global Moderator
  • Posts: 5,865
  • Gremlins are at work...
  • Mesa, AZ
    • TNET Weather Station - Mesa AZ
Re: Html, Java or php for dated file retrieval - Form Select?
« Reply #26 on: November 17, 2007, 06:40:09 PM »
I'm guessing....

that your 1HTML_top.php is wrong because I do see a title... a title of

<?php echo $TITLE; ?>

The tag in the view source is:

<title>&lt;?php echo $TITLE; ?&gt;</title>

which is exactly what it is outputting.

Check your 1HTML_top.php file to see what you are doing wrong.. Something is changing the < to &lt;  perhaps you are using something like FrontPage?

[via MacBook Connection remote]

All you need is Time, Aptitude and Desire ... and you can build just about anything...

Offline jwwd

  • Posts: 3,561
  • Silkeborg, Denmark (56:10:58 N-09:30:26 E) - Elevation 75,35 meters
    • Weather at Silkeborg, Denmark
Re: Html, Java or php for dated file retrieval - Form Select?
« Reply #27 on: November 17, 2007, 07:07:28 PM »
Hi Kevin

Doooo !!!!

Of course its Frontpage that smashes it up.

Its now corrected and everything is working fine now.

Now I can begin changing all my pages on my site.

Kevin, I wish I could help you out with something, but im affraid my skills dont manage to do that.

Have a nice day

Best regards,

Henrik

Online TNETWeather

  • Kevin Reed (KrelvinAZ)
  • Global Moderator
  • Posts: 5,865
  • Gremlins are at work...
  • Mesa, AZ
    • TNET Weather Station - Mesa AZ
Re: Html, Java or php for dated file retrieval - Form Select?
« Reply #28 on: November 17, 2007, 07:10:11 PM »
Kevin, I wish I could help you out with something, but im affraid my skills dont manage to do that.

I'll take one of those Scandinavian Money Tree's so I can plant it in my back yard.  My last money tree died from overuse (Daughter Wedding)...

All you need is Time, Aptitude and Desire ... and you can build just about anything...

Offline jwwd

  • Posts: 3,561
  • Silkeborg, Denmark (56:10:58 N-09:30:26 E) - Elevation 75,35 meters
    • Weather at Silkeborg, Denmark
Re: Html, Java or php for dated file retrieval - Form Select?
« Reply #29 on: November 17, 2007, 10:07:26 PM »
Hi Kevin

Wow - i have been searching for the Scandinavian money tree for years - havent found it yet  :lol:

I have now changed all my website - so now i include the top, menu and buttom files.

Thanks for all your help - next I will work on your calendar script and try to implement it to my website.

Best regards,

Henrik