CodeCharge Studio
search Register Login  

Visual PHP Web Development

Visually Create Internationalized Web Applications, Web Reports, Calendars, and more.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> PHP

 Redirect + Param

Print topic Send  topic

Author Message
Phil
Posted: 04/15/2004, 12:59 AM

Dear CCS users,

I have a record with labels and textboxes. I want after update to stay at the same page but to request an other ID as param from the database.

I can edit the return page but I can't say witch field I want to use as my parameter (like you can do with an link ->link parameters).

Now I found the redirect script in the PHP. It is:

 $Redirect = "mypage.php" . "?" . CCGetQueryString("QueryString", Array("ccsForm"));

I want to use an database field after the ?, so like this:
 $Redirect = "mypage.php" . "?id=" . $fldnext_id;

I already made the settings at data source: [field: ID] equals [Parameter source: ID]

Who can help me?

Kind Regards,
Phil
peterr


Posts: 5971
Posted: 04/15/2004, 7:47 PM

You mentioned labels and textboxes, therefore let me start with saying that you can read the value of a textbox but not a label.
Assuming that the field/control "fldnext_id" is a textbox (or a hidden field) then please try this:
$Redirect = "mypage.php" . "?id=" . $FormName->fldnext_id->GetValue()

(I took sample usage of the GetValue function from http://docs.codecharge.com/studio/html/ProgrammingTechn...eTextColor.html

I'm not sure though if the $Redirect variable is active/used after record update. Are you using the After Update event? Does anything at all happens when you assign some value to the $Redirect variable?
An alternative could be to use the standard PHP redirect methods, which I found discussed at http://www.experts-exchange.com/Web/Web_Languages/PHP/Q_20772681.html
Although in such case you might also want to make sure that the database connection is closed before you redirect or refresh the page (if $Redirect works for you then I'm almost certain that it will close the database connection and do other cleanup where needed)
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com
View profile  Send private message
Phil
Posted: 04/16/2004, 12:50 AM

Thank you Peter it is working now. I changed "fldnext_id" to an hidden field and the script:
$Redirect = "mypage.php" . "?id=" . $FormName->fldnext_id->GetValue()

is working correctly.

Phill

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.

Web Database

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.