Infusionsoft Legacy Form

I have created an Infusionsft opt-in page, grabed the code and have located it on an external site. Once the customer completes their name, email and submits the customer gets forwarded onto another page to collect their postall address in the same way. Within the opt-in form setup the box is ticket that enables the sending of the contact details via the URL. I am looking to use the contactId number that has been passed within the second form. Once the customer fills in their address, the form will need to pass the address using the contactId into Infusionsoft. The following line, within the form, is not working but it should help to detail what I need to change within the html form. The name field needs to match up with what Infusionsoft is expecting.

<input name="contactId" type="hidden" value="<?php echo $_GET['contactId']; ?>"/>

I hope that did not sould like waffle and that somebody can help

Kind regards

If you are echo’ing the value with PHP then why can’t you just use the PHP API and do an update onsubmit/onclick?