Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Page.IsPostBack equivalent in PHP

Tags:

post

php

When working on the same page which accepts Post data, it is good to know whether there is a special function like the one in Asp.NET such as Page.IsPostBack. Maybe I could use isset($_POST) but I am thinking there could be a special function for that.

So I want to process the post data under that function give alerts during processing the post data, otherwise it is just a page request.

like image 781
Tarik Avatar asked Jul 23 '26 19:07

Tarik


1 Answers

I am always using

if($_SERVER['REQUEST_METHOD'] == 'POST')
like image 157
Daniel Gruszczyk Avatar answered Jul 25 '26 09:07

Daniel Gruszczyk