PDA

View Full Version : i have a question



hessan
August 18th, 2001, 23:15
hey whats up
my question is i need some thing that will do this for example: every tuesday and friday it forwards it to vote.htm
and the rest of the days it goes to index.htm
what kind of script it this? cgi? asp? php?
thanks for your help

BillWill
August 18th, 2001, 23:25
Welp... could be done in anything and everything... In PHP for instance it would be something like...



<?php

$date = getdate();

// $date['wday'] is numeral value of weekday. 0 is Sunday ... 6 is Saturday
if ( $date['wday'] == '3' || $date['wday'] == '5' )
{

header('Location: vote.html');

}
else
{

header('Location: index.html');

}

?>

hessan
August 19th, 2001, 00:10
thanks alot
i really appreciate it

hessan
August 19th, 2001, 00:18
hmmm i get this error i tried another host but the same

Warning: Cannot add header information - headers already sent by (output started at /usr/local/plesk/apache/vhosts/talk.collegecommunityonline.com/web_users/gherti1/index.php:2) in /usr/local/plesk/apache/vhosts/talk.collegecommunityonline.com/web_users/gherti1/index.php on line 16



the link is http://talk.collegecommunityonline.com/~gherti1/index.php

atlas
August 19th, 2001, 01:09
Verify that you have no spaces or blank lines before the <?php tag starts

-mk