0

Hi...

I've been doing ASP.Net for years, but I am very new at PHP.

I need to redirect a user to a specific page based on the refereeing page. There's no way to calculate what the page should be so I figure I would have to use MySQL and look up the target page.

The Table would look something like

REFERRER TARGET
========= =======
www.xyz.com/page2.html mysite.org/directory/lostparts.php
www.abc.net/goofy.aspx mysite.org/listings/trucks.html?ID=32

Does anybody know how I would get this accomplished?

Thank you

2
Contributors
1
Reply
2
Views
6 Years
Discussion Span
Last Post by chrishea
0

You can get the referring page with $_SERVER

Re-directing can be done with header ("location: the url ")

As for the part in the middle, you will need to write some code to open a MySQL db and get the url from there. I'm sure that you can find tutorials and sample code if you do an internet search. To keep the setup simple, you could upload the content from a CSV file using PHPMyAdmin.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.