Answer the question
In order to leave comments, you need to log in
How to get POST variables if they are created in the admin folder?
Hello there is a post like this
RewriteEngine On
RewriteCond %{REQUEST_URI} !index.php
RewriteCond %{REQUEST_METHOD} ^POST$
RewriteRule .*? index.php [L]
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
Answer the question
In order to leave comments, you need to log in
$_POST
data can be obtained from the script to which they are sent.
Roughly speaking, if you specified:
<form action="index.php" method="POST">
<!-- -->
</form>
index.php
you will get this data from the form, and if:<form action="admin/index.php" method="POST">
<!-- -->
</form>
admin/index.php
Dmitry is not so simple. I had to create such a design because the index.php file loads other files into itself to display pages, as a result, the variables tried to be transferred to those files that it loads into itself. So that I can catch them, I found this code. And it turns out now, when creating the POST site admin panel, the variables are trying to be transferred to the head index file, and I need them to get into the adm folder index file
There is one more solution. Is it possible to password protect only one file? That is, using this file, write protection, say, on the admin.php file, in this case I can try to catch POST values.
No, this method did not help. Although when calling this file on the site, it substitutes the values of the index file and then the insides of the called one. But the admin file is called and the data is not included in this call.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question