Link to home
Start Free TrialLog in
Avatar of AntonBotes
AntonBotes

asked on

GETting or POSTing a form

How do I determine whether I am GETting from a form (i.e. first time called) or being POSTed from a form(the user caused a submit)?
Avatar of andreif
andreif
Flag of Canada image

there are 2 global arrays $_GET and $_POST

if you looking for some field name, let's say 'submit' you may check which of $_GET['submit'] or $_POST['submit'] is defined
ASKER CERTIFIED SOLUTION
Avatar of Giovanni G
Giovanni G
Flag of Italy image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Snyke
Snyke

PHP up to version 4.3.0 the arrays name was $HTTP_SERVER_VARS ... the rest is the same.