Forum Moderators: phranque

Message Too Old, No Replies

Post variables not showing

         

edynas

1:40 pm on Mar 20, 2008 (gmt 0)

10+ Year Member



I have made a new folder on a site which runs on wordpress. So my site structure is

wp-admin
wp-content
wp-includes
my_map
shop

in the main directory i changed the htaccess to

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /news/
RewriteCond %{REQUEST_METHOD} !^post$
RewriteCond %{REQUEST_URI} !^/(my_map¦shop¦my_map/*/*¦my_map/*)$
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /news/index.php [L]
</IfModule>

in my_map there are several files. I have fi a layout.php which has a form to get the layout. it uses an include to get the header, footer and content. In the content there is the html form with the folowing line

<FORM action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post">

at the top of the file i let php look for an action which is a hidden field in the form.
But it doesn't work. also if i access the page using this
[mysite.com...] etc etc it doesn't work

The strange part....i have also a form in index.php using the same methodolgy and that...is working. It's driving me up the wall :)

Anyone has any ideas..other then rewrite all my code to have it included in index.php

Thanks,
Edwin

jdMorgan

2:24 am on Mar 21, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



The method received in HTTP request headers by your server will be all uppercase, as required by the HTTP protocol:

RewriteCond %{REQUEST_METHOD} !^POST$

Jim

edynas

7:25 am on Mar 21, 2008 (gmt 0)

10+ Year Member



:)

Found the problem and it was indeed related to this. I never call my variables again using POST and untill now I never had to but I found that using it in this envirement i needed to do

$action = $_POST['action'];

While i was trying to access $action without that rule...which like i said untill now i always was able too.