@pyroSep 18.2005 — #You could use $_SERVER['HTTP_REFERER']; but that isn't the most reliable way, as it is set by the user agent, so it cannot really be trusted.
The better way would be to include a something on the form itself that will identify it.
@NogDogSep 18.2005 — #You can put it into the $_POST array by using a hidden field in the form, as Pyro sort of alluded to. Or, one time I simply gave the submit buttons different names on a couple different forms that called the same form-handler, then checked for which one called the script with something like:
[code=php] if(isset($_POST['submit_1'])) { # do this } elseif(isset($_POST['submit_2')) { # do this } else { # how did we get here? } [/code]
@strBeanauthorSep 18.2005 — #That's what I wound up doing -- putting it in the form. No reason not to...
thx
Say, sorry for piggybacking an unrelated question:
I'm using mySQL "text" datatype for a free-form text area input. When the data comes back for display, there are no line feed characters. I see them in the source after it's displayed, but of course HTML doesn't find any >br> elements, so it's all one long paragraph.
Is there a "replace" string function that I can use to add the <br> elements? If so, how do I test for a linefeed carriage return character in PHP?
Not too many people minding the store ov er on the javascript side.
[URL=http://www.webdeveloper.com/forum/showthread.php?t=79442]This [/URL] post about redirecting the browser if a cookie is set might interest your altruistic proclivities.