> Hi Mark,
> I don't think this is what you want but:
> <?php
> $mth = date('F');
> $day = date('l jS');
> echo "<p>$mth</p>\n";
> echo $day."<br />\n";
> echo '<a href="p1.html">Page 1</a> '.$comment1."<br />\n";
> echo '<a href="p2.html">Page 2</a> '.$comment2."<br />\n";
> // etc.
> ?>
>
> Are you reading data from a database?
> Are you wanting to format a full html page, and upload it?
> Regards, Bob E.
>
Hi Bob,
The data is read from the database and outputted as so:
-------------------------------------------------
<?php
$con = mysql_connect("******",""******",""******");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
mysql_select_db(""******", $con);
$query.=" DATE_FORMAT(entrydate, '%M %d, %Y') AS date";
$result = mysql_query("SELECT * FROM info ORDER BY id DESC");
while($row = mysql_fetch_array($result))
{
$date = $row["date"];
$class = $row["class"];
$url = $row["url"];
$title = $row["title"];
$comment = $row["comment"];
echo "<li class='$liclass'><a href='$url' target='_blank'>$title</a>.<br
/> $comment </li>"; ; echo "\n";
}
mysql_close($con);
?>
<?php
echo '</ul>';
?>
-------------------------------------------------
When the html page is generated, I want the links to be sorted by day
and date, so everything posted for on a given monday will show on the
page as:
-------------------------------------------------
monday 1st
link
link
-------------------------------------------------
then when links are posted on a tuesday, it would show :
-------------------------------------------------
tuesday 2nd
link
link
monday 1st
link
link
-------------------------------------------------
The outputted html would then be written to the file and the file
uploaded to the correct server and folder.
Each page on my friends site shows a months worth of links at one time.
When a new month starts, the previous is archived and then the new month
is displayed with the links from each day of that month. In the future
this script will hopefully auto archive and create a new month. a long
way off i know.
Thanks for your patience
Regards
Mark M...
Community email addresses:
Post message: [email protected]
Subscribe: [EMAIL PROTECTED]
Unsubscribe: [EMAIL PROTECTED]
List owner: [EMAIL PROTECTED]
Shortcut URL to this page:
http://groups.yahoo.com/group/php-list
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/php-list/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/php-list/join
(Yahoo! ID required)
<*> To change settings via email:
mailto:[EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/