This topic is locked
[SOLVED]

 Help with add page in popup mode

8/19/2013 1:19:30 PM
PHPRunner General questions
S
stiven author

Hello,
I was wondering maybe someone could help me with this. I'm passing values through the url and getting them on the add page in the event ProcessVvaluesAdd and this code works, but when the add page is in popup mode this code no longer works. :/ is there anyway to make this work in popup mode?
I hope this makes sense.
Thanks for your help



//process record values add page

global $conn;

$sql = "SELECT client_name FROM ies_clients WHERE case_no = '".$_GET['cid']."'";

$rs = db_query($sql,$conn);

$data = db_fetch_array($rs);
$values['case_no'] = $_GET['cid'];

$values['client_name'] = $data['client_name'];

$values['log_date'] = date('Y-m-d');
C
cgphp 8/19/2013

In the "List page: before process" event, add this code:

$_SESSION['cid'] = $_GET['cid'];


Update your code as follows:

//process record values add page

global $conn;

$sql = "SELECT client_name FROM ies_clients WHERE case_no = ".$_SESSION['cid'];

$rs = db_query($sql,$conn);

$data = db_fetch_array($rs);
$values['case_no'] = $_SESSION['cid'];

$values['client_name'] = $data['client_name'];

$values['log_date'] = date('Y-m-d');
S
stiven author 8/19/2013

Thank you so much! it works great!!!!