Platon Technologies
neprihlásený Prihlásiť Registrácia
SlovakEnglish
open source software development oslavujeme 10 rokov vývoja otvoreného softvéru! Streda, 25. november 2026
O nás
Magazín
Otvorený softvér
CVS
Služby
Index  »  Projekty  »  phpMyEdit  »  Fórum  »  Pass Current Key Value to PHP

phpMyEdit General     Pass Current Key Value to PHP
Odoslať novú tému   Odpovedať na tému    
 
brianwgr     Založený: 02.06.2010   Príspevky: 1  
Príspevok 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  
Príspevok 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)
Príspevok 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    

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