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" thenisPostBack = trueelseisPostBack = falseend ifend function
PHP
function isPostBack(){return ($_SERVER['REQUEST_METHOD'] == 'POST');}

No comments:
Post a Comment