Jump to content

PHP Calendar


FuG5333

Recommended Posts

Here's what I have so far.  The error is something about "T_ENCAPSED_AND_WHITESPACE".

[code]<?php
$todaysdate = ".$_SERVER['PHP_SELF']."?date=".mktime(0,0,0,$month -1,$d,$year).";
  if(strtotime("l",$datestamp) == "Tuesday"){
    echo "$todaysdate";
  }
?>[/code]

My goal is to get only Tuesdays to show up with a signup link.  This is the first step.  If I can figure how to put something in only Tuesdays, then I get put a link later.  The problem is, I'm trying to eventually save each signup as a 20060610 type of date so the signups can be linked to that date only.  Making sense?
Link to comment
https://forums.phpfreaks.com/topic/14223-php-calendar/#findComment-55845
Share on other sites

[quote author=redarrow link=topic=100105.msg394792#msg394792 date=1152569986]
<?
$date=getdate();

$today_date=$date[weekday];

echo $today_date;

if ($today_date =="Tuesday") {

//add code
}

?>
[/quote]

You need to enclose weekday in single or double quotes, else it's a constant. Like [code]$today_date=$date['weekday'][/code]
Link to comment
https://forums.phpfreaks.com/topic/14223-php-calendar/#findComment-56195
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.