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

 url from the address bar?

Print topic Send  topic

Author Message
vivaldi

Posts: 8
Posted: 11/27/2008, 10:30 AM

hello

i have a php and i call another php.
the php called make some things and then needs to leave the user on the same screen the user has clicked the button and called the external php.

i have this solved sending the url where the external php need to redirect the user to the php.
the php takes this parameter and after made all the operations, this php sends the user to this url.

the problem is if i have a listbox with some data as criteria for filtering records, when i come back from the external php, i lose this criteria and i see all the records without filtering as the first time i arrive to the page.

How i can send the current url as parameter in order to use it as the return address?

example of the url i see on the screen.
http://192.168.1.210/domofa/Dispositivos.php?s_nombre=&...itivosPageSize=

thanks in advance
View profile  Send private message
mentecky

Posts: 321
Posted: 11/28/2008, 6:00 AM

If I understand correctly, you are redirecting the user and you need to keep your URL parameters. You can do this with code similar to this:

global $Redirect;  
$Redirect = "redirect.php?".CCGetQueryString("QueryString", "");

Rick
_________________
http://www.ccselite.com
View profile  Send private message
vivaldi

Posts: 8
Posted: 12/01/2008, 1:59 AM

thanks for your reply.

i need to send my url parameteres as a parameter with a image control wich i use for click and call to the external php. i need to pass the url parameters using an "expression" parameter...
View profile  Send private message
maxhugen

Posts: 272
Posted: 12/01/2008, 4:27 PM

It sounds as though you don't actually want the user to leave the current page, and just run some php code (in the "background")?

If that is the case, can you use the php function exit() to quit the php page you just called, after running whatever code you need?
_________________
Max
www.gardenloco.com | www.eipdna.com | www.chrisarminson.com
View profile  Send private message
vivaldi

Posts: 8
Posted: 12/01/2008, 7:56 PM

Thanks for your reply.

Yes, i wanto to run some code but i do not want to loose the current filters and the current records im showing to the user.

i have tryed with the exit function, but the result is the page is called but after run all the code, i have a blank screen now.

what i do is to pass as parameter to the php file the url where to go after the execution of the external php file. and it work, but when i come back, i do not have the records filtered as before calling the external php.

what i need is to send as parameter the url with all the search parameters like this:

h ttp://192.168.1.210/domofa/Dispositivos.php?s_nombre=&s_descripcion=&s_nombre_id_hueco=Sala+Control&s_nombre_tipo_dispositivos=&s_codigo_casa=&s_codigo_dispositivo=&dispositivosOrder=&dispositivosDir=&dispositivosPageSize=

any idea what i need to use on the parameter?

thanks in advance.
View profile  Send private message
maxhugen

Posts: 272
Posted: 12/04/2008, 7:16 PM

I'm wondering if you need to leave the page at all? How about including the function you want to run in the same page, then in your link add an Expression Parameter like "RunFunction=1" ?

Then, in the Page_Initialize event, check if this parameter exists, and if so, run your function. At the end of the function use the CCRemoveParam() function to clear it again.

HTH
_________________
Max
www.gardenloco.com | www.eipdna.com | www.chrisarminson.com
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.

PHP Reports

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

Home   |    Search   |    Members   |    Register   |    Login


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