CodeCharge Studio
search Register Login  

Web Reports

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

YesSoftware Forums -> CodeCharge Studio -> General/Other

 Passing values between pages

Print topic Send  topic

Author Message
unaprogrammer


Posts: 5
Posted: 04/01/2004, 6:13 AM

I have a user who wants to retain values between pages as she enters orders into our Oracle database. We are using PHP. I used the Record Builder. Here is how I did this:

POST and GET
There are two methods to send data from the form to the corresponding php program on the server: GET and POST. GET sends data as arguments in the URL. POST sends data as part of the body of the page.

CCS pages that insert records into a database only work using the POST method. If you specify GET, CCS assumes that the page is just collecting data or just a display page with no database, even if you have specified a connection. It will not insert rows.

However, you can still send and retrieve data using URL args even though the method is set to POST. If you wish to pass field values between form cycles this is a good way to do that.

Method for passing parameters between forms.

SENDING PAGE:
Navigate to the record (JOBS in my case) and use the Events tab on the Properties sheet to create custom code in the After Insert event. Use the plus sign to Add Code. Then insert a line similar to this:

$Redirect = $Redirect."custmrid=".$JOBS->CUSTMRID->GetValue();

$Redirect is the CCS variable for the Return Page. This line adds a parameter to the URL which you can see when you run it.

RECEIVING PAGE:
Navigate to the record (JOBS) and use the Events tab on the properties sheet to create custom code in the Before Show. Use the plus sign to Add Code. Then insert a line similar to this:

$JOBS->CUSTMRID->SetValue(CCGetParam("custmrid"));

CCGetParam will retrieve a value from a URL argument.

Using this will override any default value for custmrid specified in the Properties sheet so you may have to set the default value in CCGetParam like this:

$JOBS->CUSTMRID->SetValue(CCGetParam("custmrid","NYCTA"));


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.