jquery - Getting the Reference URL from form element using hidden field(PHP, HTML form) -


i have website , have multiple projects. project pages has contact button , redirected contact page form integrated. i want find url coming , filling form. using pure html, css website , php form submission.

thanks in advance.!!

two options come mind:

  • easiest , recommended: redirect adding query parameter (eg, refirect to: contact.php?from=page1 instead of contact.php) read 'from' value via php $_get
  • you can use http-referrer header php (i.e. read $_server['http_referer']), may unreliable

you more creative: set cookie via js before redirecting :) there possibly many other solutions.


Comments