Skip to content

Instantly share code, notes, and snippets.

<?php
// Connect to Infusionsoft
require_once("isdk.php");
$app = new iSDK;
$app->cfgCon("connectionName");
// Get ContactID from POST variable
<?php
// Encourage you to add your own comments as we go
/*
This is how you
add multi-line comments
*/
echo "Hello World! <br/><br/>";
<?php
// Encourage you to add your own comments as we go
/*
This is how you
add multi-line comments
*/
echo "Hello World! <br/><br/>";
<?php
echo "Hello World! <br/><br/>";
$contactId = $_REQUEST['id'];
$name = $_REQUEST['name'];
$passion = $_REQUEST['fav_sport'];
echo 'Contact ID: '.$contactId.'<br/>';
echo 'Name: '.$name.'<br/>';
<?php
/*
$fname = $_POST['fname'];
$lname = $_POST['lname'];
$email = $_POST['email'];
$form = $_POST['formURL'];
*/
$fname = 'dritte';
<?php
// from https://dfy90994.infusionsoft.com/app/form/default-campaign-form2
$contactId = $_REQUEST['contactId'];
$name = $_REQUEST['inf_field_FirstName'];
$email = $_REQUEST['inf_field_Email'];
$passion = $_REQUEST['inf_custom_favsport'];
<?php
// Encourage you to add your own comments as we go
/*
This is how you
add multi-line comments
*/
$contactId = $_REQUEST['id'];
<?php
// Simple IF statements
If($contactId == 1234) {
$tagId = 26;
}
If($contactId !== 1234) { // ! means Not
<?php
// Nested If statements
If($breed == 'dog' ) {
echo 'This is a canine';
} else {
If($breed == 'horse') {
echo 'This is an equine';
} else {
<?php
/*
* Does anyone have a suggestion for this:
* I need all new contacts entered into IS--whether by web form, order form, manual or
* import to have their email * address set as their username, too.
* I'd like to set that action as an action set that so that i can run it under
* all ACTIONS and also give it to the admins to perform on imports.
* I need help in creating that action, right now all I can do is set the username
* to a specific value but can't see* where i can make that value be the email merge field. Any help?