This is probably really basic but I've not found my answer in Beginning PHP. (Probably time for something a bit meatier.)
There are to things I do regularly in ASP that I can't find out how to do in PHP. But you must be able to:
Response.Redirect - to send user to a new page.
Server.Mappath - to find the full path of the server.
Hope someone can help.
$_server maybe you should check out php.net for the server info am sure youll find something on there. /Matt
$_SERVER['DOCUMENT_ROOT'] i just found that 4 or 4 topics down maybe you can try that
As intrique said, check php.net. Specially predefined-variables section: http://fi.php.net/manual/en/language.variables.predefined.php
For the redirect, php scripters use header-function.
For example:
header('Location: http://www.phpbuilder.com');
by the sounds of it i wouldnt say he wants a redirecter ashe could even use a html refresh. Sounds more like a redirecter depending on user selection but then im no asp expert. response.redirect says to me redirect depending on response hence my assumption
(yes im happy to admit when im wicked bad wrong) maybe a better explination fof what the asp functions do would give us a clear idea of what ya want. /matt
Thanks Guys, all helpful stuff.
The $_SERVER['DOCUMENT_ROOT'] is simple and does what I want it to.
As for the redirect. Not sure.
How would I use the header with an: IF this is TRUE go here ELSE go there. (As Cahva so wisely noted.)
Something like this, and remember that to set headers, you must not have outputed anything to the page yet...
if ($var == true) { header("Location:http://www.php.net"); } else { header("Location:http://www.w3c.org"); }
Lovely.
Remember to Mark This Threads Resolved if it is...