Platon Technologies
not logged in Login Registration
EnglishSlovak
open source software development celebrating 10 years of open source development! Sunday, October 18, 2026
About Us
O nás
Magazine
Magazín
Open Source
Otvorený softvér
CVS
CVS
Services
Služby
Index  »  Projects  »  phpMyEdit  »  Forum  »  Pass Current Key Value to PHP

phpMyEdit General     Pass Current Key Value to PHP
Post new topic   Reply to topic    
 
brianwgr     Joined: 02 Jun 2010   Posts: 1  
Post Posted: 2010-06-02 03:03
Back to top  Reply with quote     

I am trying to create a checkbox in a virtual column with a unique value for each record. Here is my code:

Code:
$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:

Code:
$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     Joined: 26 Jan 2010   Posts: 10  
Post Posted: 2010-07-08 12:42
Back to top  Reply with quote     

did you find a solution to this problem - passing $key value to php.

thanks

 
doug     Joined: 10 Feb 2003   Posts: 1013   Location: Denver, Colorado (USA)
Post Posted: 2010-07-10 14:53
Back to top  Reply with quote     

brianwgr wrote:
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:
Code:
$opts['fdd']['dummy'] = array(
  'name'     => 'Dummy',
  'options'  => 'L',
  'select'   => 'T',
  'sql'    => 'your_key_column * 1',
  'sort'     => true
);


If an alphanumeric identifier:
Code:
$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:
Code:
$opts['fdd']['Export'] = array(
   'name' => 'Export',
   'select' => 'V',
   'maxlen' => 1,
   'nowrap' => true,
   'sort' => false,
   'sql' => 'your_key_column',
   'php'  => 'include/export.php',
   'display' => 'V'
);


 
Post new topic   Reply to topic    

Copyright © 2002-2006 Platon Group
Site powered by Metafox CMS
Go to Top · Feedback form · Odkazový formulár · Application form · Prihláška
Report bug on PLATON.SK website · Upozorniť na chybu na PLATON.SK webstránke · Terms of use · Podmienky použitia · Privacy policy · Ochrana osobných údajov