Search found 8 matches

by Cyx07
Fri Nov 21, 2003 3:15 pm
Forum: Javascript
Topic: Refreshing a page/Dynamic Updates
Replies: 1
Views: 642

Refreshing a page/Dynamic Updates

I'm currently working on making myself a calendar with links to news items for a day on the calendar. What I'd like to do is have the news item load below the page after it is clicked on. Also, I'd like the calendar to update per year by clicking on the year wanting to be viewed at the top. All the ...
by Cyx07
Sun Nov 16, 2003 6:09 pm
Forum: PHP - Code
Topic: PHP Includes and file extensions
Replies: 12
Views: 2922

I realize this is probably a mess of code and could be much simplified, but it gets the job done...so I thought I'd share, and let everyone enjoy my haphazard code. <?php $today = date("mdy"); $filename = "lotd".$today.".html"; $filemonth = date("m"); $fileday...
by Cyx07
Sun Nov 16, 2003 2:56 am
Forum: PHP - Code
Topic: PHP Includes and file extensions
Replies: 12
Views: 2922

I could number them sequentially, but I'm using the date info for more than just the filename. Currently, the code looks like this: <?php $today = date("mdy"); $filename = "lotd".$today.".html"; $filemonth = date("m"); $fileday = date("d"); $fileyear...
by Cyx07
Sun Nov 16, 2003 1:24 am
Forum: PHP - Code
Topic: PHP Includes and file extensions
Replies: 12
Views: 2922

An additional question, which hopefully you or someone else can answer...is there a simple way to skip a file not in existence, or should I just create an empty file for a day I might skip? Also, is it possible to have it continue until it hits "today" somehow?
by Cyx07
Sun Nov 16, 2003 12:20 am
Forum: PHP - Code
Topic: PHP Includes and file extensions
Replies: 12
Views: 2922

Not sure what you mean by putting a second variable into the first. But this might help. <?php $filename = "lotd111".$filepart1.$filepart2."03.html"; ?> Will work fine. Exactly what I was talking about. Wasn't quite sure how to say it...so that sentence after rereading it seems ...
by Cyx07
Sun Nov 16, 2003 12:13 am
Forum: PHP - Code
Topic: PHP Includes and file extensions
Replies: 12
Views: 2922

Working from your example <?php $filename = "lotd111203.html"; $filepart = "2"; while (file_exists($filename)) { include($filename); $filepart ++; $filename = "lotd111".$filepart."03.html"; } ?> Obviously this would only work for ten files but it will push yo...
by Cyx07
Sat Nov 15, 2003 11:02 pm
Forum: PHP - Code
Topic: PHP Includes and file extensions
Replies: 12
Views: 2922

Re: PHP Includes and file extensions

vigge89 wrote:1: You have to save it as .php, else it will be processed as normal HTML, except if you use httaccess to process .html files with PHP.
Gotcha. Anyone else have an answer about my page includes?
by Cyx07
Sat Nov 15, 2003 5:05 pm
Forum: PHP - Code
Topic: PHP Includes and file extensions
Replies: 12
Views: 2922

PHP Includes and file extensions

I'm new to PHP, but have the extreme basics figured out. It helps that it is similar to C++, which made it a lot easier for me to pick up on. 2 things I've ran into so far though that I need some help with. First, my host won't parse any PHP code without having a .php extension. Is there a way aroun...