The "page you came from" is called the "REFERER" and in PHP you can get it by querying this: $_SERVER['HTTP_REFERER'] HOWEVER, this cannot be 100% reliable; this value is set by the user agent (i.e. browser) some might not set this value and some can actually change it. An option could be that you pass some sort of "page id" to all the GETs or POSTs that point to your enquiry.php code. Alligator_666 http://www.vicxsite.com/ Sudhakar <finals27@xxxxxxxxx> wrote: Hi I have a common form page where a user submits an enquiry ex: enquiry.html This enquiry.html will call a php file called processing.php in the form action for processing the enquiry and inserting into database. There are many ways a user can reach enquiry.html for example from aboutus.html contactus.html etc My question is how can the processing.php file track which was the previous page a user was browsing before viewing and submitting an enquiry from enquiry.html This would help me to keep track of the source of enquiry.html Any help will be greatly appreciated. __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com [Non-text portions of this message have been removed]