Reputation: 3057
I have a form with an action that redirects to a page;
<form method="post" action="active">
The "active" page is a rewritten rule;
RewriteRule ^active$ active_form-sec.php
The page with the form is also a RewriteRule.
The problem is, everytime I submit the form and I get on the active page, the POSTs are empty.
How can I fix this problem?
Thanks in advance!
Upvotes: 1
Views: 3202
Reputation: 1781
This may help:
.htaccess:
Options +FollowSymlinks<br />
RewriteEngine On
RewriteCond %{THE_REQUEST} ^POST<br />
RewriteRule ^form-posting/?$ posting.php [L,NC]
form.php:
form method="post" action="form-posting"
posting.php:
print_r($_POST);
I have tried this code and it works.
Upvotes: 0
Reputation: 14365
active_form-sec.php
is called when you hit the submit button?print_r($_POST)
?active-form-sec.php
isn't called, your mod_rewrite isn't working properlyname
attributes)Debug done.
Upvotes: 2
Reputation: 11148
that's probably because the .htaccess doens't collect the form data.
Why not doing it like this:
<form method="post" action="active_form-sec.php">
Upvotes: 0