Jump to content

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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.