Php getenv

software development

#1

Hello

I’m brand new to DreamHost.

I’m having a problem getting a PHP script snippet to work…


$method = getenv(“request_method”); //and other environments

echo $method;


Is it something to do with the proprietary server configuration?

Thanks!

Richard


#2

I neglected to mention that this script worked previously on another server and is referred by a form on another page.

The script, which opens a database works fine but this part (there is a little more to it) relies on-- getenv(“request_method”); which is not working


#3

[quote]$method = getenv(“request_method”); //and other environments

echo $method;[/quote]
If it isn’t working, couldn’t you use something like this?

if($_GET) { $method = "GET"; } else { $method ="POST"; }


Simon Jessey | Keystone Websites
Save $97 on yearly plans with promo code [color=#CC0000]SCJESSEY97[/color]