You need to sign in to do that
Don't have an account?
How to get a connection to the salesforce?
Hi, I am trying to push some data to the salesforce from my web site. Here is the testing code. However, when it runs, there is an error occured with the LOGIN line: "INVALID_LOGIN: Invalid username or password or locked out."
-------
<?php
$USERNAME = "ABC@gmail.com";
$PASSWORD = "password";
define("SOAP_CLIENT_BASEDIR", "register-plus/salesforce_php");
require_once (SOAP_CLIENT_BASEDIR.'/SforceEnterpriseClient.php');
require_once (SOAP_CLIENT_BASEDIR.'/SforceHeaderOptions.php');
require_once (SOAP_CLIENT_BASEDIR.'/userAuth.php');
try {
$mySforceConnection = new SforceEnterpriseClient();
$mySoapClient = $mySforceConnection->createConnection(SOAP_CLIENT_BASEDIR.'/enterprise.wsdl.xml');
$mylogin = $mySforceConnection->login($USERNAME, $PASSWORD);
$sObject = new stdclass();
$sObject->FirstName = 'Smith';
$sObject->LastName = 'John';
$sObject->Phone = '510-555-5555';
$createResponse = $mySforceConnection->create(array($sObject), 'Leads');
$ids = array();
foreach ($createResponse as $createResult) {
print_r($createResult);
array_push($ids, $createResult->id);
}
} catch (Exception $e) {
echo $mySforceConnection->getLastRequest();
echo $e->faultstring;
}
?>
Can you login by using this user id and pwd in SFDC?
$USERNAME = ABC@gmail.com;
$PASSWORD = "password";