Results 1 to 3 of 3

Thread: How to grab the page url in an email form?

Hybrid View

  1. #1
    Join Date
    Oct 2013

    How to grab the page url in an email form?

    Hi all,

    I'm working on a site with an email form on each page, if possible, I would like it to automatically grab and send the page url to the email address which the form directs to (as a part of the message). Is there any way to do this?

    Thank you,

  2. #2
    Join Date
    Jul 2013
    Voorheesville NY USA
    If what you are saying is you want the url of the page from which you are gathering the email info from and from which you end up sending the mail, then I think you mean to use $_SERVER['PHP_SELF'].

  3. #3
    Join Date
    Sep 2013
    Try out with the below code:

    <form name="myform" action="<?=$_SERVER['PHP_SELF']. "?" . $_SERVER['QUERY_STRING'];?>" method="GET">

    or could you echo $location; die; after this line:

    $location = $_GET['current_url'];

    Hope this helps.
    strad solutionswww.stradsolutions.com

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center