Submit Your Article Forum Rules

Results 1 to 4 of 4

Thread: PHP Question. How to grab current URL and send in an email

  1. #1
    Senior Member
    Join Date
    Jul 2004
    Posts
    131

    PHP Question. How to grab current URL and send in an email

    I'm sure this will be a piece of cake for you guys. I currently have a form that my company uses for several different promotions that users arrive at through a variety of sources. Each one of these sources have their own referrer i.e Adwords, email ad, etc.

    What I would like to do is have a function that will capture the web address currently displayed on the nav bar i.e http://www.mysite.com/web_form.php?referrer=Google

    and simply place that address in the email.

    How would I do this?

  2. #2
    Senior Member
    Join Date
    Jul 2004
    Posts
    131
    anyone?

  3. #3
    Senior Member
    Join Date
    Jul 2003
    Posts
    174
    Try $_SERVER['PHP_SELF']. It should return the current url. Here is a list of some other predefined variables that php has.
    Joe
    GimmeItNow.com
    Shopping Directory
    Gift Registry For Any Occassion

  4. #4
    Senior Member
    Join Date
    Jul 2004
    Posts
    131
    thanks jdiben, I actually found that the PHP_REFERER does exactly what I need, but thanks for pointing me in the right direction!

Similar Threads

  1. Email to send to based on drop down selection
    By morestar in forum Web Programming Discussion Forum
    Replies: 17
    Last Post: 04-13-2010, 03:11 PM
  2. What's the best time to send Email?
    By wenwilder in forum Marketing Strategies Discussion Forum
    Replies: 10
    Last Post: 02-01-2008, 10:15 PM
  3. Can't get php forms to send email on new server
    By spenland in forum Web Programming Discussion Forum
    Replies: 7
    Last Post: 03-15-2006, 04:08 AM
  4. Help ! webproworld does not send me email notifications :(
    By marcel in forum WebProWorld: Guidelines/Announcements/Suggestions
    Replies: 12
    Last Post: 01-19-2006, 03:36 PM
  5. how to send html based email
    By bobkom in forum Marketing Strategies Discussion Forum
    Replies: 5
    Last Post: 11-10-2004, 10:18 PM

Posting Permissions

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