Does anyone know of a script that sends the name of the page that the person was on. i.e. similar to a directory script that fill in the category when you click on the "add URL" button
One way could be with a simple PHP At the top of the page you could have something like: <? $page = "Page1"; ?> Code (markup): and then later on in the page, you could recall that: <? if ($page == "Page1") echo ' WHATEVER YOU WANT ' else if ($page == "Page2") echo ' WHATEVER YOU WANT ' else if ($page == "Page3") echo ' WHATEVER YOU WANT ' else if ($page == "Page4") echo ' WHATEVER YOU WANT ' ?> Code (markup): That the sort of thing you thinking of? It can be adapted in many ways, just depends on your needs.
For example, I have an accommodation website that has 15000 pages (all different places)I want clients to be able to go to one of these (for example - Barmedman page which is called BarmedmanNSW.htm) and click on a button to advertise their site. When it goes to the next page (a registration form) I want the name of the town (Barmedman - without the NSW) to be prefilled in the form. Hope this explains it better.
It would depend on how many different "end bits" you have - if they are all NSW.htm or they would all be 7 characters as this one is then it is easy. If they are all different and different lengths etc then it depends if they are static or will be ever changing (as a whole not individual locations) Assuming they are all NSW.htm then: If Not Page.IsPostBack Then TextBoxID.Text = Request.UrlReferrer.AbsolutePath.Replace("NSW.htm", "") End If Code (.Net):