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 -> PHP

 Redirect w/parameter after update/insert/delete

Print topic Send  topic

Author Message
maggiemel

Posts: 75
Posted: 05/18/2004, 12:38 PM

Hello, I have a couple of CCS ASP applications where I create a custom block (template) within my record form that contains one variable, "Message." When a user adds, modifies or deletes a record, I use those CCS events to append "&Message=The record has been whatever" to the return page variable (Redirect). On my return page -- in this case, the same record form -- I use the BeforeShow event and the GetParam function to retrieve the value from the query string and then replace the Message variable of my custom block with that text. Works like a charm.

Only I can't figure out how to do using PHP. I'm using the examples for using Custom Templates from the Help file, but I think the problem (at least with the After Update event) is that the Redirect variable is not being appended with my Message text. Is the Redirect different for PHP than it is for ASP? Does anyone have some idea how I can pass these simple message via a query string and reload the same page with my Message showing?

Thanks, as always, for your help!
_________________
Melissa Cahill
http://www.hellcatmaggie.net/
View profile  Send private message
peterr


Posts: 5971
Posted: 05/19/2004, 12:21 AM

Which event did you use to manipulate the $Redirect variable?
A good example may be the MultiStepRegistration1 page in CCS Example Pack. It contains PHP code that also alters the $Redirect.
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com
View profile  Send private message
maggiemel

Posts: 75
Posted: 05/19/2004, 5:38 AM

Hello, Peter. Thanks for the tip, but it seems my example pack is written in ASP (at least the MultiStep Registration example is in ASP).

Anyway, I don't think it's a matter of bad syntax or not knowing enough PHP. I am using the After Update event. My code is simply:

$Redirect = $Redirect . "&Message=Information has been updated.";

I just tried it in the After Execute Update event, but that doesn't work either. The record updates, the Return Page is loaded (in this case it's the same page), but the Message string is not showing up in the query string of the URL.

Got another idea?
_________________
Melissa Cahill
http://www.hellcatmaggie.net/
View profile  Send private message
peterr


Posts: 5971
Posted: 05/19/2004, 10:46 AM

The example pack works OK with PHP. This example is also live at http://examples.codecharge.com/ExamplePack/MultiStepReg...gistration1.php

You will need to select PHP when creating new project based on the example pack. Only the events in one specified language are copied into your project.
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com
View profile  Send private message
maggiemel

Posts: 75
Posted: 05/27/2004, 6:55 AM

Peter, thanks -- my mistake was a simple one and I was able to uncover it simply by looking at the same code in the example pack.

I forgot to declare the $Redirect variable as a global variable.

Many thanks!
_________________
Melissa Cahill
http://www.hellcatmaggie.net/
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.

Internet Database

Visually create Web enabled database applications in minutes.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


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