I'm using https://github.com/Insightly/insightly-php and having a problem passing a simple variable to a method in it:
require("insightly.php");
$i = new Insightly('my-base64-encoded-api-key');
Do you know why getContacts()
doesn't seem to see the variable $lastname
here?
Example:
$lastname = $_GET["lastname"];
$contacts = $i->getContacts(array("filters" => array('LAST_NAME=\'$lastname\'')));
If I hard code a name in the array for example:
$contacts = $i-getContacts(array("filters" => array('LAST_NAME=\'Smith\'')));
it accepts it and returns results,
but with the variable $lastname
it returns nothing - and there is no error so it must not see it. - It's probably a syntax error on my part but I would appreciate anyone pointing me in the right direction :)