Click to See Complete Forum and Search --> : date and time stamp won't show


tykst
01-26-2004, 07:05 AM
I'm doing my own guestbook using some free code i found. Everything's working fine except the date and time stamp won't show up. Is there anything wrong with that part of the code? It's probably right under my nose but I'm really code-illiterate.


$tdd = `date +%d`;
chop($tdd);
$tmm = `date +%B`;
chop($tmm);
$tyy = `date +%Y`;
chop($tyy);
$tti = `date +%T`;
chop($tti);
$temdt = "$tdd $tmm, $tyy at $tti";


#Save back new content
open(GUESTBOOK,">$guestbook");
foreach $line (@arrguestbook)
{
print GUESTBOOK "$line";
if ($line =~ '--newentrieshere--')
{
print GUESTBOOK "\n<font class=normal><B><a href=mailto:$email>$name</a></b> ($genderF$genderM) $country</font>\n";
print GUESTBOOK "<br><font class=normal>Home Page: $url</font>\n";
print GUESTBOOK "<br><font class=normal>$message</font><br>\n";
print GUESTBOOK "<br><font class=small>$temdt</font><br><hr width=100% size=1>\n";
}
}
close(GUESTBOOK);

print "Content-type: text/html\n";
$gbook = "$guestbookurl\n\n";
print qq(Location: $gbook);
return;