I have 2 pages called email.php and sendmail.php.email (email.php directs to sendmail.php).I want to print the URL of email.php in sendmail.php
How can i do it?

Recommended Answers

All 3 Replies

I think you want to get the referer page. Use echo $_SERVER['HTTP_REFERER'] to print the referer page.

It depends. Based on how you stated the question, the answer could be as simple as:

echo "http://... email.php";

If you have other requirements or limitations, please state what they are.

u could also put the httpreferrer in a get varibale

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.