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

========= =======
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

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.