Better use $_SERVER['REQUEST_METHOD']
:
if ($_SERVER['REQUEST_METHOD'] === 'POST') {
// …
}
More Related Contents:
- show recaptcha after 5 attemp in php
- How can I parse data from server using Json?
- save user images in MYSQL database by which method? [closed]
- Illegal string offset Warning PHP
- How to validate an Email in PHP?
- parse youtube video id using preg_match [duplicate]
- Force file download with php using header()
- How to Remove Array Element and Then Re-Index Array?
- Insert string at specified position
- php/mysql with multiple queries
- When to use static vs instantiated classes
- Page redirect after certain time PHP
- Find total number of results in mySQL query with offset+limit
- PHP case-insensitive in_array function
- Using PHP substr() and strip_tags() while retaining formatting and without breaking HTML
- PHP keep checkbox checked after submitting form
- Exotic names for methods, constants, variables and fields – Bug or Feature?
- How do I convert Word smart quotes and em dashes in a string?
- Post to a Facebook user’s wall with cURL PHP
- How do i count same values in an array and store it to a variable?
- Can’t install PHPUnit via PEAR, requires PEAR Installer >= 1.9.2, can’t upgrade PEAR from 1.9.0
- How to send mail using PHP?
- Strip off specific parameter from URL’s querystring
- How to read Windows logged in username with PHP/IIS
- Is mysqli_real_escape_string safe?
- Make text wrap in a cell with FPDF?
- how to get user’s screen resolution with PHP [duplicate]
- How to force page not to be cached in PHP?
- phpmailer send gmail smtp timeout [duplicate]
- ftp_put is corrupting my movies after transfer, is it wrong?