Re: POST detection
| From: | Jason Wong | Date: | Thu, 12 Jun 2003 21:14:10 +0000 |
| Subject: | Re: POST detection | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-151311@lists.php.net to get a copy of this message | ||
On Friday 13 June 2003 05:08, Johnny Martinez wrote:
> I have a self referring script that $_POST's two times at the beginning.
> The problem is that the first time the script comes up those two $_POST
> vars aren't being submitted and the webserver complains.
>
> If I could detect if the vars were passed and if not then skip that would
> be great. What's a good trick to detect for the first time?
if ($_POST) { do_something_with_post(); }
or
if (!empty($_POST)) { do_something_with_post(); }
should do.
--
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
------------------------------------------
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
------------------------------------------
/*
"Thank heaven for startups; without them we'd never have any advances."
-- Seymour Cray
*/