CodeCharge Studio
search Register Login  

Visual Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> PHP

 Advance by one day (Nearly there) [RESOLVED]

Print topic Send  topic

Author Message
saseow

Posts: 744
Posted: 02/20/2009, 9:50 AM

I have a page with a grid and one of the calling parameters is like:

¤t_date=2009-02-03

Now, I have two links on the page (Previous Day) and (Next Day). Is it possible to reload the page with either the previous days data or the next days data by clicking these links? I guess my question is how can I set the 'current_date' parameter from a link?

Any help/advice would be great!
View profile  Send private message
saseow

Posts: 744
Posted: 02/22/2009, 6:02 AM

I have got a little further with this but I am stumped at the last hurdle. May well be a simple fix:

I have a button in a form to (supposedly) send the date back by 1 day. In the on click event I have:

//Code to move the day backwards
$cur_date = CCGetParam(current_date,0);
$proj_id = CCGetParam(project_id,0);
$work_id = CCGetParam(ID,0);
//Subtract 1 day (86400 secs)
$cur_date = strtotime($cur_date);//Create unix Timestamp
$cur_date= $cur_date - 86400;
$cur_date= date("Y-m-d",$cur_date);//Format the timestamp back

header("Location: work_details_day.php?ID=".$work_id."&project_id=".$proj_id."¤t_date=".$cur_date);
//global $Redirect;
//$Redirect="work_details_day.php?ID=".$work_id."&project_id=".$proj_id."¤t_date=".$cur_date;

Everything looks great with echo but the URL retains the same current_date value and the message:

"The URL was redirected to . Please click the link to go there" comes up. This happens both with $Redirect and header methods.

I am sure that the answer is simple and really need some help.

View profile  Send private message
saseow

Posts: 744
Posted: 02/22/2009, 6:07 AM

Forgot to put the exit; afterwards. :(
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

MS Access to Web

Convert MS Access to Web.
Join thousands of Web developers who build Web applications with minimal coding.

CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.