PDA

View Full Version : Problem submitting a form's data



Yesideez
07-30-2005, 09:21 PM
Hi, slight problem.

I have a file (index.php) which is the main file running the whole site. Each link for each page calls
index.php?page=pagename Then depending on what pagename is by checking an array depends on which file is called using include().

On my contactme.php file it detects the 'submit' button but doesn't seem to be finding anything in the forms. I've double checked the names of the text boxes in the forms and nothing is mistyped. I can't even store the contents of my form in variables in index.php with no checking then in my contactme.php file check to see if these variables contain the data I need them to contain.

In the form (contactme.php) I'm using method="post"

Am I making a silly mistake somewhere or is this one of those "local" variable things?

Twey
07-31-2005, 10:54 AM
You're using POST for the form, but GET for the page? I think you ought to check for both GET and POST in index.php so that you can submit to index.php with a hidden input called "page" with the value of "contactme." GET and POST don't mix well.
How are you retrieving the variables? If you're using $fieldname, it probably won't pass as it should. Try using $_POST['fieldname']. $_GET and $_POST are autoglobals: they should be accessible from anywhere.

dd2me
08-02-2005, 06:10 AM
try $HTTP_POST_VAR or $HTTP_GET_VAR, by the way what is your php version