Announcement

Collapse
No announcement yet.

include referer in form

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    include referer in form

    Hi all

    I built a php form the other day that loads in a greybox and can be triggered from any product page by any customer.

    It asks them some questions and emails the form to us.

    I want to include a hidden part in the form that shows the refering product url.

    I've tried adding a hidden input field and using javascript and php referers in it, but neither work because i get text output.

    I know this is going to be one of those things which is really simple and my understanding is letting me down! If someone can show me the correct way it will hopefully all fall into place though.

    Thanks in advance, Matt
    http://www.itwiz.co.uk

    http://www.AntiV.net - The Discount Antivirus Store

    #2
    If your form is in a separate file, then in whatever fires off your Greybox add
    Code:
    prodid='<actinic variable name="ProductID" encoding="perl" selectable="false" />';
    And in your form

    Code:
    <script>document.write('<input type="hidden" name="productid" value="' + prodid + '"/>');</script>
    Norman - www.drillpine.biz
    Edinburgh, U K / Bitez, Turkey

    Comment


      #3
      Hi Norman, thanks for your perls of wisdom.

      My Link
      Code:
      <div style="margin-left: auto; margin-right: auto; background: #eee; border: 1px solid #660000; width: 90%;"><a href="http://url.html" prodid='<actinic variable name="ProductID" encoding="perl" selectable="false" />'; rel="gb_page_center[520, 560]">Link Text Here</a></div>
      and in my form
      Code:
      <script>document.write('<input type="hidden" id="productid" name="productid" value="' + prodid + '"/>');</script>
      Finally in the processing php file
      Code:
      Page they reported this from: " . $_POST['productid'] . "
      It all looks ok to me - but for some reason, nothing gets posted into the email for this.
      http://www.itwiz.co.uk

      http://www.AntiV.net - The Discount Antivirus Store

      Comment

      Working...
      X