I have created an account an account on insightly web to get contacts from my web to the CRM throught which I created an HTML form to do so.
But on a page i also want to get information to show on the page which is entered by the user like when he clicks o submit on the next page the info can also be shown.
To do that I have created a php script which we always do so to get info using $_POST method. Here is the code for the HTML form below:
<form name="insightly_web_to_contact" action="https://hsyxkqpg.insight.ly/WebToContact/Create" method="post" id="frm" onsubmit="return validatechk()>
<input type="hidden" name="formId" value="FzCeWqL/hiOQUb5fmRQm6w=="/>
<label for="insightly_firstName"></label>
<input id="insightly_firstName" class="text-field1" name="FirstName" type="text" placeholder="Name*"/>
<input type="hidden" name="emails[0].Label" value="Work"/><label for="email[0]_Value"></label><input id="emails[0]_Value" class="text-field1" name="emails[0].Value" type="text" placeholder="E-Mail*"/>
<input type="hidden" name="phones[0].Label" value="Work"/><label for="phones[0]_Value"></label><input id="phones[0]_Value" class="text-field1" name="phones[0].Value" type="text" placeholder="Phone*"/>
<input type="hidden" name="addresses[0].AddressType" value="Home" /><label for="addresses[0]_Street"></label><input id="addresses[0]_Street" class="text-field1" name="addresses[0].Street" type="text" placeholder="Street Address*"/>
<label for="addresses[0]_City"></label><input id="addresses[0]_City" class="text-field2" name="addresses[0].City" type="text" placeholder="City*" />
<label for="addresses[0]_State"></label><input id="addresses[0]_State" class="text-field2" name="addresses[0].State" type="text" placeholder="State*"/>
<label for="addresses[0]_PostalCode"></label><input id="addresses[0]_PostalCode" class="text-field2" name="addresses[0].PostalCode" type="text" placeholder="ZipCode*" />
<input type="submit" name="submit" value="Check Availability" id="button"/>
</form>
and below is the php code which I had created and above html was generated from the website:
<?php
$name=$_POST['FirstName'];
$pass=$_POST['emails[0].Value'];
$address=$_POST['addresses[0].Street'];
$city=$_POST['addresses[0].City'];
$state=$_POST['addresses[0].State'];
$zipcode=$_POST['addresses[0].PostalCode'];
$mobile=$_POST['phones[0].Value'];
if(isset($_POST['submit']))
echo "$name" . "$address" . "$city" . "$state" . "$zipcode" . " $mobile" ;
}
?>`
so the main problem is that I am unable to get data from the form to echo on the web page.