| Index
» Projekty
» phpMyEdit
» Fórum
» Pass Current Key Value to PHP |
 |
brianwgr
Založený: 02.06.2010
Príspevky: 1
Zaslal: 2010-06-02 03:03
Návrat hore
Odpovedať s citátom
|
I am trying to create a checkbox in a virtual column with a unique value for each record. Here is my code:
| Kód: |
$opts['fdd']['Export'] = array(
'name' => 'Export',
'select' => 'V',
'maxlen' => 1,
'nowrap' => true,
'sort' => false,
'sql' => "",
'php' => 'include/export.php',
'display' => 'V'
); |
My export.php looks like this:
| Kód: |
$html = "<input type=\"checkbox\" name=\"exportList[]\" value=\"$key\" />";
return $html; |
I can't seem to get the value of my checkbox to be a unique identifier, hopefully, this value would be the value of my defined table key.
Any ideas how I can get the key value into the value field in my php file?
|
msavi
Založený: 26.01.2010
Príspevky: 10
Zaslal: 2010-07-08 12:42
Návrat hore
Odpovedať s citátom
|
did you find a solution to this problem - passing $key value to php.
thanks
|
doug
Založený: 10.02.2003
Príspevky: 1013
Bydlisko: Denver, Colorado (USA)
Zaslal: 2010-07-10 14:53
Návrat hore
Odpovedať s citátom
|
| brianwgr Napísal: |
| I can't seem to get the value of my checkbox to be a unique identifier, hopefully, this value would be the value of my defined table key. |
Untested, perhaps the following sql examples will help.
If a numeric identifier:
| Kód: |
$opts['fdd']['dummy'] = array(
'name' => 'Dummy',
'options' => 'L',
'select' => 'T',
'sql' => 'your_key_column * 1',
'sort' => true
); |
If an alphanumeric identifier:
| Kód: |
$opts['fdd']['dummy'] = array(
'name' => 'Dummy',
'options' => 'L',
'select' => 'T',
'sql' => 'your_key_column',
'sort' => true
); |
Did you try it with sql set as follows:
| Kód: |
$opts['fdd']['Export'] = array(
'name' => 'Export',
'select' => 'V',
'maxlen' => 1,
'nowrap' => true,
'sort' => false,
'sql' => 'your_key_column',
'php' => 'include/export.php',
'display' => 'V'
); |
|
|
Odoslať novú tému
Odpovedať na tému
|
|
|
|