Hi,

I am new Drupal user. Last time I was trying to develop simple module and I have simple question to you: How I can get variables, which was post from form?

ERt

Comments

conann’s picture

You will get better feedback if you have a more usefull Subject

bertboerland’s picture

--
groets
bertb

--
groets
bert boerland

recidive’s picture

You can grab variables from forms using the PHP's $_POST global variable like any other php code, assuming that your form use http method = post.

Henrique Recidive
http://www.sacrahome.net

Henrique Recidive

ert’s picture

I know about $_POST, but I think about Drupal function. Drupal has any fonction to get that variables?

---
ERt

sami_k’s picture

If it's a form $edit['var']

--
Read the handbook, search the forums, then ask!
http://drupal.etopian.net (Consulting, Development, and Hosting)

Dublin Drupaller’s picture

Hi Ert,

recommend you have a quick look at the following snippet that allows you to Print PHP variables from GET or POST forms

Hope that helps.

Dub

Currently in Switzerland working as an Application Developer with UBS Investment Bank...using Drupal 7 and lots of swiss chocolate

Beau-1’s picture

Hi,

I can access the $HTTP_POST_VARS using $_POST, but how can I access $HTTP_POST_FILES? I am trying to make a custom form, including file upload.

Thanks,
Beau

beginner’s picture

See this thread:

http://drupal.org/node/26372

If you want to access $_POST directly from your function, remember to make it global.

--
http://www.reuniting.info/
Healing with Sexual Relationships.