Forums

Link back to Form

markj72000 29 May, 2008
I've been using your form for about a month and i'm glad i purchased it "Worth Every Penny", the forums here and your help docs have been a great resource for me getting the form running but i've run up against something my boss wants that has me baffled.

We use a marketing company to manage all of our online advertising and they use some sort of a proxy to monitor all the clicks on the site if a user gets to the site via a paid link. I think of it has a invisiable layer over the top or our website. Well anyway, we used to have a site prior to me on Homestead which is one of those user friendly ways of making a website with their editor. All of the form request that came from the Homestead site also included a link to the webpage where the form was submited from which was sort of cool because we could see by looking at the url if the form was submitted by a user who just found the site organically or by a user who found us by clicking on a paid link from our marketer.

If they found us organically then the url might look something like this.

http://www.mysite.com/contactus.html

If they found us by clicking a paid link thru our paid marketing company then the url might look something like this because they were browsing the site thru the marketers proxy.

http://mysite.marketingsite.com/contactus.html


What i need to do is add this info back to the form data that is submitted to our sales staff so they can see the url from which the form was submitted. I'm assuming i need to add some hidden code to the form but not really sure what or where to add it.

I would very much appreciate any feedback on this.

thanks,

Mark
GreyHead 30 May, 2008
Hi Mark,

This should be available in $_SERVER['REMOTE_HOST'] if they've let you see it. You cna just put
<?php echo $_SERVER['REMOTE_ADDR']; ?>
into your email template, or into the value of a hidden field in your form if you prefer.

Bob
markj72000 31 May, 2008
Is this how i would enter the code for a hidden field in the form code.

<input type="hidden" name="url" value="<?php echo $_SERVER['REMOTE_ADDR']; ?>" />

If so then this is only giving me the IP address of the user sending the form and not the URL location of the form they filled out.

Mark
Max_admin 31 May, 2008
Hi Mark,

Then the variable you are talking about is $_SERVER['QUERY_STRING'] , google PHP $_SERVER and you will get all the possible variables!

Cheers

Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
GreyHead 31 May, 2008
Hi Mark,

Sorry, I put REMOTE_HOST in the text, then pasted the other value in the code.

Bob
markj72000 31 May, 2008
Changing to Host still just produces an ip address (I'm guessing the web host ip) instead of the url. I'll google PHP $_SERVER as Max suggested and see what i can come up with but i'm not the best coder when it comes to PHP so i will probably need more help.

thanks

Mark
GreyHead 31 May, 2008
Hi Mark,

The list is here. maybe REQUEST_URI ??

Bob
markj72000 01 Jun, 2008
I'll keep playing with it.. Request_URI - produces the last page only.

example: /contactus

this was the url it produced but i'm out of town this week so it's hard for me to test with the paid marketing to see if maybe it would produce the entire url but i doubt it would since this is only showing the last page of the url.

Mark
This topic is locked and no more replies can be posted.