Need help integrating custom PHP Form with Unbounce

0 replies
Setting up PHP on custom landing page to access custom forms/live database

Hi I need help in integrating a custom PHP form which links to a live leads database into my a new version of my landing page which I am creating on Unbounce.

The standard way in which my form would be integrated with my website is that I would download various configuration PHP files, as well as a form template itself, which then sit in the same place as my Index file i.e. the landing page as well as a number of other folders. There is also a set of files and folders called Nusoap which sends info back to the leads server. All of this is already configured properly and sits on my server.

The landing page file which is created by Unbounce is not downloadable, it is kept on the Unbounce server- it means I am unable to configure the custom form I have in the standard way, which is to turn it into a PHP file and


The custom script needs to be able to send information back to the server, as on my current site it currently sends leads back to a database. This is done normally using a combination of the Nusoap system, PHP, CSS and config files, which are already setup correctly in my domain. and explained in section 4 here.
TCH Autosubmission guide

The bit of advice which sits on the documentation is this:-

4.v. Integrating the form with your existing site
The form itself is contained in the file <formtype>-form.php. However, as long as your server is running php, you can easily copy and paste the form code into an existing html or php webpage. Make sure to copy the entire document, from the first <?php tag to the last ?> tag. Also, if the filename of the page you pasted the code into ends with .html or .htm, you should change it to .php
The standard form uses css styles which reside in the file header.php. These styles govern the size and formatting of the form elements as well as the text style, colour etc. When adding the form to an existing webpage, it's likely that the existing page already has it's own styles, either at the top of the page in the <head> section or in a separate stylesheet (usually called something like stylesheet.css). To avoid confusion, it's good practice to move the styles that are in header.php to the place where the page's other styles already reside. Once this has been done, you should be able to delete header.php and find that the form should look the same. (Click here for some css notes on the newer-style forms e.g. Logbook Loans.)
An alternative way to include the form on an existing page is to upload all the form files to your site and then place a simple iframe in the body of your main page which points to the form you want to include. Here's an example using the debt management form:
<iframe src="debt-management-form.php"
name="my_iframe"
width="500"
marginwidth="1"
height="600"
marginheight="1"
align="left"
allowtransparency="true"></iframe>
In this example, the file debt-management-form.php is expected to be in the same directory as the page which contains the iframe. However, we could tell the iframe to look for the form in a different directory:
<iframe src="forms/debt-management-form.php"This would look in the "forms" directory which is below the site's root, whereas;
<iframe src="../forms/debt-management-form.php"..would look in the "forms" directory which is above the site's root.

This seems to indicate that I can, or get someone to create a custom PHP which can access all my files on the server remotely, even if my Unbounce page is not on the server?

So my questions are:

1) How can I write a custom PHP reference to remotely access the files which already sit on my main site server?

2) Which elements do I need to identify/copy across to achieve this?

Look forward to your response.

Thanks.
#custom #form #integrating #php #unbounce

Trending Topics