September 16th, 2013, 05:28 AM
Injecting my code to 3rd party to capture data?
Wait a minute, it sounds dodgy but I promise (as far as I know) it isnt! One of my colleague in a different dept has asked me for this request.
So on a web page (of his client) http://www.directline-holidays.co.uk/subscribe.cfm
there is an email address field in the left section. When user fills this, they are taken to another page where user fill in a bit more information. Now the tech people on this site are not very technical so my colleague has asked me to help write a code which he will give them to put on their website.
so what needs to happen is that the email address & extra info needs to go to our database.
Any suggestions on how I should go about doing this?
I was thinking to create an intermediary page, so on the first page when user enters the email address, it will redirect to step1.php (for example) which will process the details and redirect immediately to second page. This will then redirect to step2.php, process the details & redirect to thank you page?
This way the data will go to their current system & we will also get the data.
I dont really want to give them the code that interacts with my db, so should i create a webservice? (step1 & step2.php) will interact with my webservice on my domain? will this violate the cross domain policy?
or i can use Ajax to send data through when they click on the form submit button? i.e. send data to a php page on their domain, which interacts with my database. This way no intermediary pages need to be written?
Last edited by paulh1983; September 16th, 2013 at 05:48 AM.