Platon Technologies
neprihlásený Prihlásiť Registrácia
SlovakEnglish
open source software development oslavujeme 10 rokov vývoja otvoreného softvéru! Pondelok, 30. november 2026
O nás
Magazín
Otvorený softvér
CVS
Služby
Index  »  Projekty  »  phpMyEdit  »  Fórum  »  put current record ID into URL

phpMyEdit Configuration     put current record ID into URL
Odoslať novú tému   Odpovedať na tému    
 
DaaL1973     Založený: 09.12.2007   Príspevky: 7  
Príspevok Zaslal: 2008-10-16 18:18
Návrat hore  Odpovedať s citátom     

Hi guys, I am trying to pass the value of my current record ID, into a url so I can print a formatted page, trouble is I cant seem to get the variable..

What I have got working at the moment is the following code in a header page that is called in view mode

"

<div class="central"><center>
<a href="CustDet1_print_record.php?PME_sys_operation=PME_op_View&PME_sys_rec=123456"> | Print Record</a> |
"

this gives me link on my page that takes me to a new page, with all the required data for record ID 123456, All works OK so far...

What I want to do is change the record ID from 123456 to dynamically give the ID of the record that is currently being viewed.

I tried "&PME_sys_rec=<php echo $PME_sys_rec; ?>"
and "&PME_sys_rec=<php echo $_POST[PME_sys_rec]; ?>"
but nothing is output for the ID

Is this possible? or do i have to use a URL field within the table itself?

 
thefeldkircher     Založený: 11.10.2008   Príspevky: 9  
Príspevok Zaslal: 2008-10-16 21:22
Návrat hore  Odpovedať s citátom     

DaaL1973 Napísal:
Hi guys, I am trying to pass the value of my current record ID, into a url so I can print a formatted page, trouble is I cant seem to get the variable..

What I have got working at the moment is the following code in a header page that is called in view mode

"

<div class="central"><center>
<a href="CustDet1_print_record.php?PME_sys_operation=PME_op_View&PME_sys_rec=123456"> | Print Record</a> |
"

this gives me link on my page that takes me to a new page, with all the required data for record ID 123456, All works OK so far...

What I want to do is change the record ID from 123456 to dynamically give the ID of the record that is currently being viewed.

I tried "&PME_sys_rec=<php echo $PME_sys_rec; ?>"
and "&PME_sys_rec=<php echo $_POST[PME_sys_rec]; ?>"
but nothing is output for the ID

Is this possible? or do i have to use a URL field within the table itself?


Hello

Try
Kód:
<a href="CustDet1_print_record.php?PME_sys_operation=PME_op_View&PME_sys_rec=" + <?php $key ?> + " | Print Record</a> |"


Then inside CustDet1_print_record.php

Kód:
$target = @$_REQUEST['PME_sys_rec'];


Finally set a Filter to find your record

Kód:
$opts['filters'] = 'Date REGEXP "^'.$target.'"';


I've not tried it, but it should work...

Hope it helps

 
Odoslať novú tému   Odpovedať na tému    

Copyright © 2002-2006 Platon Group
Stránka používa redakčný systém Metafox
Na začiatok · Odkazový formulár · Prihláška
Upozorniť na chybu na PLATON.SK webstránke · Podmienky použitia · Ochrana osobných údajov