Today's function comes not from PHP, but ASP.NET. We're going to replicate the isPostBack() function from ASP.NET's Page object.
ASP
function isPostBack()
if uCase(Request.ServerVariables("REQUEST_METHOD")) = "POST" then
isPostBack = true
else
isPostBack = false
end if
end function
PHP
function isPostBack()
{
return ($_SERVER['REQUEST_METHOD'] == 'POST');
}
No comments:
Post a Comment