itzumar
Posts: 88
|
Posted: 12/29/2013, 7:17 AM |
|
dear!
i need php code for using previous record value in next record formulaa. any hlep?????
_________________
Umar |
|
|
Markie
Posts: 251
|
Posted: 12/30/2013, 10:10 AM |
|
Hi, I suppose you can store the previous record value in a (session) variable and use it for the next record formula.
_________________
The Netherlands, GMT+1
Tools: CCS 5.1, Windows 7, Navicat, Ultraedit
Local server: XAMPP with Apache, php and MySQL
Webserver: Windows 2008 IIS 7, php and MySQL |
|
|
itzumar
Posts: 88
|
Posted: 12/30/2013, 10:15 AM |
|
how to write code for session??????? plz write it for me as am beginner?????? or show some example
_________________
Umar |
|
|
Markie
Posts: 251
|
Posted: 12/30/2013, 11:19 AM |
|
You can use the Declare Variable action. Add a Before
Show event to your record -> Add Action -> Declare Variable
Name: myvariable
Initial value: $Component->your_form_field->GetValue()
The generated code will look something like:
//Declare Variable @112-99384CD6
global $myvariable;
$myvariable = $Component->naam->GetValue();
//End Declare Variable
By the way, CodeCharge has a detailed help file which can help you out. You find it in the installation folder of CodeCharge. Just search for variable etc.
_________________
The Netherlands, GMT+1
Tools: CCS 5.1, Windows 7, Navicat, Ultraedit
Local server: XAMPP with Apache, php and MySQL
Webserver: Windows 2008 IIS 7, php and MySQL |
|
|
itzumar
Posts: 88
|
Posted: 12/30/2013, 11:28 AM |
|
thanks alot dear
_________________
Umar |
|
|
eratech
Posts: 513
|
Posted: 12/30/2013, 8:14 PM |
|
CCS uses a similar method when it's working out the running totals for Reports - I think it's in the Report - Before Show Row.
Either check the Help File (I agree - it really is quite good) and then make a sample Report to see the generated code.
Eric
_________________
CCS 3/4/5 ASP Classic, VB.NET, PHP
Melbourne, Victoria, Australia |
|
|
spaul8808
Posts:
|
Posted: 06/07/2014, 4:50 AM |
|
If you would use your previous page details on the next page then "sessions" is the best way because with the help of session we can fatch the value of previous page on the next page. If you are new in the programming field then below are the links for your help:
1. https://php.net/manual/en/book.session.php
2. http://www.w3schools.com/php/php_sessions.asp
---------------------------------------------------------------------------------------------------
Reference:- http://www.logicspice.co.uk/php-programming-services/
|
|
|
MichaelMcDonald
Posts: 640
|
Posted: 06/07/2014, 3:55 PM |
|
Quote Markie:
You can use the Declare Variable action. Add a Before
Show event to your record -> Add Action -> Declare Variable
Name: myvariable
Initial value: $Component->your_form_field->GetValue()
The generated code will look something like:
//Declare Variable @112-99384CD6
global $myvariable;
$myvariable = $Component->naam->GetValue();
//End Declare Variable
By the way, CodeCharge has a detailed help file which can help you out. You find it in the installation folder of CodeCharge. Just search for variable etc.
Extending this, you can use the declared variable as a POST value like this on a page redirect:
global $Redirect;
$Redirect = "pagename.php" . "?myvariable=" . $myvariable . "&myvariable1=" . $myvariable1
_________________
Central Coast, NSW, Australia.
|
|
|
|