| Index
» Projects
» phpMyEdit
» Forum
» get field data to include in link (calling php script) |
 |
eva
Joined: 30 May 2014
Posts: 2
Posted: 2014-05-31 00:02
Back to top
Reply with quote
|
I appology for this obviously simple question, but I can't find a solution to this:
retrieving data works fine, by clicking on a person's name (or mail address) I would like to send a mail to this person.
So, adding a link and invoking a php script works - but I can't find out how to get the data (e.g. prename AND surname of this person) to handle it to the php script.
In the example below I use ..?PName=$value to handle the prename to the script - but how do I get the surname at this stage? to combine the terms into something like ?PName=$value&SName=$...????
any help appreciated, thanks in advance!
Eva
$opts['fdd']['PName'] = array(
'name' => 'PName',
'URL' => 'http://www.xxxxxxxxxx/phpedit/test.php?PName=$value',
'select' => 'T',
'maxlen' => 255,
'sort' => true,
);
$opts['fdd']['SName'] = array(
'name' => 'SName',
'select' => 'T',
'maxlen' => 255,
'sort' => true
);
|
doug
Joined: 10 Feb 2003
Posts: 1013
Location: Denver, Colorado (USA)
Posted: 2014-05-31 18:24
Back to top
Reply with quote
|
Remove the 'url' option and use CONCAT to build a link, see
http://opensource.platon.org/forum/projects/viewtopic.php?t=603945&highlight=concat+mailto
|
eva
Joined: 30 May 2014
Posts: 2
Posted: 2014-06-03 23:48
Back to top
Reply with quote
|
oohh...
thanks a lot! I was not able to understand this from the documentation, sorry!!
|
doug
Joined: 10 Feb 2003
Posts: 1013
Location: Denver, Colorado (USA)
Posted: 2014-06-04 00:22
Back to top
Reply with quote
|
It is easier than it looks, but it is tricky.
Experiment with it. Add this (dummy) virtual field to your form after changing "domain" to the name of one of your fields.
$opts['fdd']['dummy1'] = array (
'input' => 'R',
'name' => 'Whois',
'sql' => 'CONCAT("<a href=\"http://whois.domaintools.com/", domain, "\" target=\"_blank\">whois</a>")',
'options' => 'VFL',
'escape' => false,
'sort' => true
);
|
doug
Joined: 10 Feb 2003
Posts: 1013
Location: Denver, Colorado (USA)
Posted: 2015-01-14 18:59
Back to top
Reply with quote
|
Post your code for the I field.
Probably you need to add LF to the 'options'
http://opensource.platon.org/projects/doc.php/phpMyEdit/html/configuration.permission-options.html
|
|
Post new topic
Reply to topic
|
|
|
|