Matteo Ferrari
|
| Posted: 04/12/2002, 8:52 AM |
|
Hi CodeChargers,
I have a record page (PHP+templates) that can be called by several places.
It's a 'batch' page (special action updating some flags) that should return
back to calling page.
Do you have ideas on how to do it ???
I'm using Apache 1.3.20 on Windows for development, Linux for production.
Thanks a lot for your kind help.
Matteo Ferrari
|
|
|
 |
MJH
|
| Posted: 04/12/2002, 10:45 AM |
|
If you place your batch code in the page open event, end it with a
response.redirect . I am not working with PHP, but this ASP VB code might
help understand the process:
'#############################################
dim id
id = GetParam("rToC_id")
IF not IsEmpty(id) THEN
cn.execute "delete from rTOc where rTOc_id=" & id
'return to referring page with same record
response.redirect("EditResources.asp?r_id="&GetParam("r_id") )
Else
End If
'#############################################
Matteo Ferrari <m.ferrari@tiscalinet.it> wrote in message
news:a96vs1$kbu$1@news.codecharge.com...
> Hi CodeChargers,
> I have a record page (PHP+templates) that can be called by several places.
> It's a 'batch' page (special action updating some flags) that should
return
> back to calling page.
> Do you have ideas on how to do it ???
> I'm using Apache 1.3.20 on Windows for development, Linux for production.
>
> Thanks a lot for your kind help.
> Matteo Ferrari
>
>
>
|
|
|
 |
Richi Novello
|
| Posted: 04/14/2002, 2:08 AM |
|
the PHP equivalent of response.redirect is header("Location:
2 hints:
1. take a look at php manual; there are italian and .chm versions too
2. take a look at codecharge generated code
Ciao
Richi Novello
"MJH" <AnswerInNewsgroupPlease@no.spam.please> ha scritto nel messaggio
news:a976f7$1nv$1@news.codecharge.com...
> If you place your batch code in the page open event, end it with a
> response.redirect . I am not working with PHP, but this ASP VB code might
> help understand the process:
> '#############################################
> dim id
> id = GetParam("rToC_id")
>
> IF not IsEmpty(id) THEN
>
> cn.execute "delete from rTOc where rTOc_id=" & id
> 'return to referring page with same record
> response.redirect("EditResources.asp?r_id="&GetParam("r_id") )
>
> Else
> End If
>
> '#############################################
>
> Matteo Ferrari <m.ferrari@tiscalinet.it> wrote in message
>news:a96vs1$kbu$1@news.codecharge.com...
> > Hi CodeChargers,
> > I have a record page (PHP+templates) that can be called by several
places.
> > It's a 'batch' page (special action updating some flags) that should
> return
> > back to calling page.
> > Do you have ideas on how to do it ???
> > I'm using Apache 1.3.20 on Windows for development, Linux for
production.
> >
> > Thanks a lot for your kind help.
> > Matteo Ferrari
> >
> >
> >
>
>
|
|
|
 |
Matteo Ferrari
|
| Posted: 04/15/2002, 7:09 AM |
|
Thanks to all.
I've been suggested to use $HTTP_REFERER variable, that contains the calling
page URL.
Simply using:
header("Location: $HTTP_REFERER");
solved my problem; I don't need to specify the return page.
Thanks again and Happy CodeCharging !!
Matteo Ferrari
"Matteo Ferrari" <m.ferrari@tiscalinet.it> ha scritto nel messaggio
news:a96vs1$kbu$1@news.codecharge.com...
> Hi CodeChargers,
> I have a record page (PHP+templates) that can be called by several places.
> It's a 'batch' page (special action updating some flags) that should
return
> back to calling page.
> Do you have ideas on how to do it ???
> I'm using Apache 1.3.20 on Windows for development, Linux for production.
>
> Thanks a lot for your kind help.
> Matteo Ferrari
>
>
>
|
|
|
 |
Alexey Alexapolsky
|
| Posted: 04/17/2002, 1:50 AM |
|
Calling page URL is stored in HTTP_REFERER server variable.
--
Alex
CodeCharge Developer
"Richi Novello" <novello.r@libero.it> wrote in message
news:a9bgug$doa$2@news.codecharge.com...
> the PHP equivalent of response.redirect is header("Location:
>
> 2 hints:
>
> 1. take a look at php manual; there are italian and .chm versions too
> 2. take a look at codecharge generated code
>
> Ciao
> Richi Novello
>
> "MJH" <AnswerInNewsgroupPlease@no.spam.please> ha scritto nel messaggio
>news:a976f7$1nv$1@news.codecharge.com...
> > If you place your batch code in the page open event, end it with a
> > response.redirect . I am not working with PHP, but this ASP VB code
might
> > help understand the process:
> > '#############################################
> > dim id
> > id = GetParam("rToC_id")
> >
> > IF not IsEmpty(id) THEN
> >
> > cn.execute "delete from rTOc where rTOc_id=" & id
> > 'return to referring page with same record
> > response.redirect("EditResources.asp?r_id="&GetParam("r_id") )
> >
> > Else
> > End If
> >
> > '#############################################
> >
> > Matteo Ferrari <m.ferrari@tiscalinet.it> wrote in message
> >news:a96vs1$kbu$1@news.codecharge.com...
> > > Hi CodeChargers,
> > > I have a record page (PHP+templates) that can be called by several
> places.
> > > It's a 'batch' page (special action updating some flags) that should
> > return
> > > back to calling page.
> > > Do you have ideas on how to do it ???
> > > I'm using Apache 1.3.20 on Windows for development, Linux for
> production.
> > >
> > > Thanks a lot for your kind help.
> > > Matteo Ferrari
> > >
> > >
> > >
> >
> >
>
>
|
|
|
 |
|