Forum Moderators: coopster

Message Too Old, No Replies

problem with submitting forms

$_POST not set, could it be mod_rewrite?

         

SteveCA

11:53 pm on Jan 19, 2004 (gmt 0)

10+ Year Member



hi guy,

after submitting a form on my website, php say the $_POST array is empty. i am using mod_rewrite and i think this might be the problem. it works completely fine on my computer, but when i upload to my host it seems the form variables are getting deleted. before i was having a problem with my host's mod_rewrite actually changing what the address bar says. this made me believe there was an external redirect happening on top of mine. i'm curious if this is creating havoc with my forms. has anyone ever has this problem before? or know what I can do to fix it?

thanks for your help,
steve

lorax

1:42 am on Jan 20, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



What happens when you disable your mod-rewrite?

Birdman

2:03 am on Jan 20, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Could be that your host has an older version of PHP installed.

Try using $HTTP_POST_VARS["form_item_name_here"] instead.

Also: be sure that your <form> tag uses the method="post" attribute.

More... [php.net...]

Added:If it IS mod_rewrite causing the problem, move the form action to a URL that wil not be rewritten via mod_rewrite.

SteveCA

5:39 am on Jan 20, 2004 (gmt 0)

10+ Year Member



ya i tried $HTTP_POST_VARS and my host is using php v4.3.4. see the thing is i have my entire site going through index.php so it would very difficult to change this to single pages. i'll keep trying other things though. thanks guys.