Thursday, July 12, 2007

Post & Get

Well, on the php page that processes the form, you have one of two options.

If you're using method='get' for your form.. your variable is going to be in $HTTP_GET_VARS[formObjectName];

or if you're using method='post', your variable is going to be in $HTTP_POST_VARS[formObjectName];.

If your server is using newer versions of PHP, $_POST[formObjectName] and $_GET[formObjectName] are the shorthands for the ones above.

formObjectName is the the value of the name attribute on the form... like using method='post' can be accessed using $_POST[userName].

No comments: