Simple (but not too simple:) calendar in php

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
mahr
Forum Newbie
Posts: 11
Joined: Sat Aug 12, 2006 10:43 am

Simple (but not too simple:) calendar in php

Post by mahr »

I woud like to have on my page simple calendar with two major properties:

1) it shoud allow quickly change view to some year or month AND
2) each date (number on calendar) should just pass me (to the next page) info about chosen date, so I could use this date for further processing (SQL...).

I do not need many of other functions (which I found during searching on web) which such a calendar could have - adding notes to particular date ...

maybe something like this

*************
<< < August > >>
M 1 2 3 4 5 6 7
T x x x x x x x
W x x x x x x x
....
*************

<< - go back one year
< - go back one month

Maybe for year there should be something faster - dropdown menu for year

Any other idea is welcome!
User avatar
Ollie Saunders
DevNet Master
Posts: 3179
Joined: Tue May 24, 2005 6:01 pm
Location: UK

Post by Ollie Saunders »

Isn't this your 3rd or 4th topic about this?
User avatar
bmcewan
Forum Commoner
Posts: 55
Joined: Wed Jun 02, 2004 7:19 am
Location: West Yorkshire, UK.

Post by bmcewan »

mahr
Forum Newbie
Posts: 11
Joined: Sat Aug 12, 2006 10:43 am

Post by mahr »

ole wrote:Isn't this your 3rd or 4th topic about this?
First post here.
I also asked in frihost forum but did not receive any answer so I try here!

And got the right answer :D
Thank you bmcewan!
User avatar
Ollie Saunders
DevNet Master
Posts: 3179
Joined: Tue May 24, 2005 6:01 pm
Location: UK

Post by Ollie Saunders »

mahr wrote:I also asked in frihost forum but did not receive any answer so I try here!
Sorry you are right.
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Post by RobertGonzalez »

Might I suggest a google search for these types of things? Or even searching these boards? This is a common question asked around here.
mahr
Forum Newbie
Posts: 11
Joined: Sat Aug 12, 2006 10:43 am

Post by mahr »

I've done search by google and find lots of calendar which were not suitable for me. Anyway maybe I gave up to quickly and I must admit I haven't made search through this excelent forum.

I have one (dummy ) question concerning upper link http://www.dynamicdrive.com/dynamicinde ... lendar.htm for calendar, which is actualy javascript. It says that it generates hidden field with date value, but I do not know how I get to this field with php?
$_POST('orderdate') do not work!

Code: Select all

<form action="test.php" method="post">

<script>DateInput('orderdate', true, 'DD-MON-YY')</script>

<input type="submit" name="submit" value="Pass date">

</form>
and test.php

Code: Select all

<?php

print $_POST('orderdate');

?>
:oops:
User avatar
Ollie Saunders
DevNet Master
Posts: 3179
Joined: Tue May 24, 2005 6:01 pm
Location: UK

Post by Ollie Saunders »

$_POST['orderdate']
mahr
Forum Newbie
Posts: 11
Joined: Sat Aug 12, 2006 10:43 am

Post by mahr »

ole thank you!

I am really :oops:
I do know know how could I miss this.
Post Reply