This topic is locked

How to redirect from VIEW Edit to TABLE Edit passing same value

8/6/2009 12:51:26 PM
PHPRunner General questions
O
olegsg author

Hi
I have table CONTRACTS
CntrNR (PK)

Date

Client
And view CONTRACTS_VIEW
CntrNR

Date

Client

Brokers
CONTRACTS_VIEW is not updatable, therefore I need to add redirect event from CONTRACTS_VIEW Edit to CONTRACTS Edit which passes the same values from CONTRACTS_VIEW.
Kindly advise PHP code to enter in "Redirect to another page" Action.

J
Jane 8/7/2009

Hi,
here is a sample:

if (@$_REQUEST["editid1"])

{

header("Location: CONTRACTS_edit.php?editid1=".$_REQUEST["editid1"]);

exit();

}

O
olegsg author 8/10/2009

Hi,

here is a sample:


It works. Thank you.

O
olegsg author 8/11/2009

One more question.
In case of few editid's (editid1, editid2, editid3 ... etc) what changes in PHP code to apply ?

J
Jane 8/12/2009

Please see my changes below:

f (@$_REQUEST["editid1"] && $_REQUEST["editid2"])

{

header("Location: CONTRACTS_edit.php?editid1=".$_REQUEST["editid1"]."&editid2=".$_REQUEST["editid2"]);

exit();

}