Re: include() question
| From: | Erik Price | Date: | Thu, 14 Mar 2002 22:10:42 +0000 |
| Subject: | Re: include() question | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-88583@lists.php.net to get a copy of this message | ||
On Thursday, March 14, 2002, at 05:03 PM, Jan Rademaker wrote:
I think what Edward means is that you can't pass parameters to an included file, like include("some.inc?var=value"); That's true, at least for local files. include("http://remotesite/some.php?var=value") will work, as long as remotesite has php installed, of course.yes, a very clean way to do it (that I've used successfully) is something like: $current_page = "User Login"; if ($badlogin) { header("Location: http://domain.com/~eprice/badlogin.php?errormsg=" . $current_page); } This cleanly separates the string from the variable, but they are concatenated before being passed as an argument to the header() function. This passes the name of the script as a querystring variable called $_GET['errormsg'], so that the receiving script can take some action based on where the user was sent from. Erik ---- Erik Price Web Developer Temp Media Lab, H.H. Brown pricee@hhbrown.com