• Howdy! Welcome to our community of more than 130.000 members devoted to web hosting. This is a great place to get special offers from web hosts and post your own requests or ads. To start posting sign up here. Cheers! /Peo, FreeWebSpace.net
managed wordpress hosting

php/html copyright year code

GeorgeB

Chairman/CEO TMCG
NLC
I have looked all over on w3schools.com, and cannot find what I am looking for.

I am using a new wisywig editor, that is better than the last.

I went to input the html code for the copyright year, and it won't display it correctly.

The software is basekit. They use CSS and HTML.

Does anyone know what code can be used?

Hostgator.com mentioned that the html code I was using was not dynamic, and needed to be static, but my cell got disconnected and I have been on the phone all day, so didnt try calling back.
 
No idea what you're talking about.

Are you just trying to use © ??

That's the code that will get you the copyright symbol.
 
Can you show us what you can't get to work George?

If Basekit's an editor then you should be able to open a word doc and insert/symbol and choose the © symbol then copy and paste it - I just did that there :)
 
I am not referring to the copyright sign. I am referring to the 2nd year in the copyright

Copyright © 2011-2012 <<< I want the year in red to automatically change when each new year comes.

They said the html code for it, is dynamic, and I need it to be static (or vice versa).

The tech was talking about using PHP code that would make the HTML code static, and that w3schools.com, taught you how to do it, and was explaining, but my cell disconnected.
 
You mean like this;

HTML:
&copy; <?php 
$copyYear = 2011; 
$curYear = date('Y'); 
echo $copyYear . (($copyYear != $curYear) ? '-' . $curYear : '');
?> Company.

Which shows this;

© 2011-2012 Company.
 
I would say yes, but after putting that code in, it took out both years, and just left copyright © company name.
 
Lets see the code you have so far :)

Here is the entire code

<p style="text-align: center;"><span style="color: black;">Copyright &copy; <?php
$copyYear = 2011;
$curYear = date('Y');
echo $copyYear . (($copyYear != $curYear) ? '-' . $curYear : '');
?> VIP Recycling LLC.
A subsidiary of <span style="color: #0f00bd;"><a href="/http://millenniumcapitalcorp.com" target=
"_blank"><span style="color: #0f00bd;">The Millennium Capital Group,
LLC.</span></a></span></span></p>
 
I paste that code in and get;

Copyright © 2011-2012 VIP Recycling LLC. A subsidiary of The Millennium Capital Group, LLC.



(take the '/' out of <a href="/http://millenniumcapitalcorp.com" target=
"_blank"> ;)
 
I paste that code in and get;

Copyright © 2011-2012 VIP Recycling LLC. A subsidiary of The Millennium Capital Group, LLC.



(take the '/' out of <a href="/http://millenniumcapitalcorp.com" target=
"_blank"> ;)

I had the / removed, but it got added back some how.

Also, I have the code like that, but if you go to http://viprecycling.com/, you will notice there is no years in the footer.
 
Haven't tried Basekit but looking at the source code of the page it's being stripped out, or you need to insert php code in a particular way.

I'll look at basekit and see what it does :)
 
Just tried it, Basekit doesn't handle php, dare say anything dynamic being added, so you'll have to take the plunge and change it once a year...
 
There can't be HTML code for it, as HTML is static. You need some dynamic language for inserting dynamic content.

Yeah, I think that is what the hostgator tech was saying before my cell cut off. Unfortunately, that is nothing but GREEK to me!
 
Here you go.

Dare using Javascript oO
HTML:
<script>
&copy; 2011-
<script type="text/javascript">
var curdate = new Date()
var year = curdate.getFullYear()
document.write(year)
</script>
 
This thread is the funniest thing I've read tonight, made me chuckle from top to bottom (of the thread) & glad it all got sorted out

&copy; 2012 - <?php html/php - it's all the same nonsense!!! lol :) ?>
 
Back
Top