| Index
» Projekty
» phpMyEdit
» Fórum
» put current record ID into URL |
 |
DaaL1973
Založený: 09.12.2007
Príspevky: 7
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
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
|
|
|
|