Forum Moderators: coopster
How do you want the new posts to be displayed? Display all new posts, untill the user has checked them as read? Or display all posts newer than x days?
I think those issues, and maybe more, are good for you to specify to us, before we can start using our caffeine filled brains.
i have set the OnChange property of 'site' to this.form.submit()
My aim is to display certain records depending on the site chosen and the month.
However when i click on the site ....value for the month is empty and when i chose month the value for site is empty bcos on clicking either of them the page gets reloaded. Hence the records are not filtered by both the criterias
i need both the values at any given time. All of the above stuff is inside a form with post method
if print_r($HTTP_GET_VARS) only returns Array(), that means that the $HTTP_GET_VARS array is empty.
It looks like you are passing your variables in two ways, by links and by forms.
When you pass variables in a link, via a URL query string, they'll be in your $HTTP_GET_VARS array.
In that case, you need to have your links look something like
http://yoursite.com/page2.php?month=October&year=2004. This will put the value "October" into the variable $month and the value "2004" into $year. Then you can retrieve them with $HTTP_GET_VARS['month'] and $HTTP_GET_VARS['year']. (Also with $_GET.) When you pass variables via a form with method="post", the variables will be put in your $HTTP_POST_VARS array. eg; <select name="month"><option>October</option> ... </select>. Then retrieve with $HTTP_POST_VARS array['month']. (Also $_POST)
i have links like Jan¦Feb¦Mar¦Apr¦May etc
i want that when i click on Mar. I want to display certain data for Feb, Mar and April.
I plan to put the values of 3 months in an array and loop thru the array to display appropriate values. But how do I obtain the names of 3 months? Also cud u please tell me the syntax of passing an array using method="get". I need a function which will determine the next month and the previous month depending on the month which has been clicked.
i searched but cud not find such a function.
Any help is appreciated.
Thank you
In your other question, I wasnt' quite sure what we were working with. If you do something like having your months in an array...
$months = array('1' => 'Jan', '2' => 'Feb', '3' => 'Mar', ...); and in your script you have
$current_month = 3; // (example for March)
$current_year = 2004;
$prev months_year = $current_year;
$next months_year = $current_year;
if (isset($months[$current_month-1])) $prev_month = $months[$current_month-1];
else {
$prev_month = $months[12];
$prev months_year--;
}
if (isset($months[$current_month+1])) $next_month = $months[$current_month+1];
else {
$next_month = $months[1];
$next_months_year++;
}
This is fairly crude, but maybe that will help you.