Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>So the marketing database is on a 3rd distinct domain, separate from the original web host and the 2nd CRM domain? And all 3 domains are hosted on separate servers?</p> <p>You could do it in 1 cURL request if on the CRM server script, after processing the POST vars you do a header redirect that attachs the POST vars as GET vars to the ESP server url. But that's probably not a good idea. And w/ cURL you cant do 2 "simultaneous" requests, you can only do one after the other.</p> <p>If it were me, I'd write a chronjob on the ESP server to grab all new/modified records from the CRM database for that day, but maybe that won't work in your situation. </p> <p>also a suggestion, if your form field names will always match submitted var names, you can replace:</p> <pre><code>$referred_by_text = $_POST["referred_by_text"]; $broker_text = $_POST["broker_text"]; $email1 = $_POST["email1"]; $radiobutton = $_POST["radiobutton"]; $trade_futures = $_POST["trade_futures"]; $trade_fx = $_POST["trade_fx"]; $trade_equities = $_POST["trade_equities"]; $fields = array( 'referred_by_text'=&gt;urlencode($referred_by_text), 'broker_text'=&gt;urlencode($broker_text), 'email1'=&gt;urlencode($email1), 'radiobutton'=&gt;urlencode($radiobutton), 'trade_futures'=&gt;urlencode($trade_futures), 'trade_fx'=&gt;urlencode($trade_fx), 'trade_equities'=&gt;urlencode($trade_equities) ); foreach($fields as $key=&gt;$value) { $fields_string .= $key.'='.$value.'&amp;'; } $fields_string = rtrim($fields_string,'&amp; '); </code></pre> <p>with something like this:</p> <pre><code>$allowed_vars = array("referred_by_text","broker_text","email1","radiobutton","trade_futures","trade_fx","trade_equities"); $outputarray = array(); foreach($_POST as $key =&gt; $value){ if(in_array($key,$allowed_vars)){ $outputarray[] = $key.'='.urlencode($value); } } $fields_string = implode('&amp;',$outputarray); </code></pre> <p>this will make it a lot easier to add or modify field names since you only change the instance in the allowed array and not in multiple places. the in_array protects you from extra unwanted POST values, and the implode will join your name/value pairs without the need to remove the last &amp;</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload