I have a website that currently uses a standard PHP form to email me their name and contact details. Nothing out of the norm there. However what I'm wanting if possible is for the email I receive to include Adwords information such as the keyword they typed and which ad they clicked on. You can use parameters in Adwords which add themselves to the destination URL. For example: domain.com?kw=widgets (widgets is what the visitor typed in) With the URL information do you think it would be possible to grab these variables and add them to the form data, through PHP? Cheers in advance.
Sure, just use a hidden form value. echo "<input type=\"hidden\" name=\"keyword\" value=\"$_GET["kw"]\">";, or something to that effect .
Thanks, but 'something to that effect' won't really work with me as I don't know any PHP at all! lol. I'd need the code to be absolutely spot on as I won't know what to change if it doesn't work. Would the above code go on the webpage (where the form is) or inside the process.php (that sends me the form data).
"<input type=\"hidden\" name=\"keyword\" value=\"".$_GET["kw"]."\" />" <-- That string will output the hidden value you need, so it would go wherever the rest of your form is, and your emailing script would handle it on the other end. If you don't know any PHP and can't figure it out, I'd be happy to edit your script to add this feature for $15.