I have a simple php form which i want to use the form api to post the data to Hubspot and create a contact.
Using the form API in my php file. The api is connecting with Hubspot but the variable are not being collected to create the contact.
//Need to populate these variable with values from the form.
$str_post = "first_name=" . urlencode($first_name)
. "&last_name=" . urlencode($last_name)
. "&email=" . urlencode($email)
. "&telephone_number=" . urlencode($telephone_humber)
. "&hs_context=" . urlencode($hs_context_json); //Leave this one be
Is there something wrong with my variables? should i have a $str_post = for each varable? they all seem to match and also match the matching hubspot form. But have no contact data even though the form has been submitted.
Any help would be greatly appreciated.