• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion
  • Inviting everyone to the UX test of a new security feature in the WP Toolkit
    For WordPress site owners, threats posed by hackers are ever-present. Because of this, we are developing a new security feature for the WP Toolkit. If the topic of WordPress website security is relevant to you, we would be grateful if you could share your experience and help us test the usability of this feature. We invite you to join us for a 1-hour online session via Google Meet. Select a convenient meeting time with our friendly UX staff here.

Question $_POST and $_GET not always available

Koen Verbruggen

Basic Pleskian
Dear Plesk gurus,

Given the following hypothetical setup in page.php
Code:
<form action="page.php?id=3">
 <input type="text" name="somevar" value="hello" />
</form>

I would expect to reload page.php with:
$_GET['id'] en $_POST['somevar'] being set
However I only receive $_GET['id'].
I used to get them both on another server (apache only).

I bypassed this by providing the id var in $_POST but then something else happens:
seems $_POST vars are only provided when I submit to the full URL:
action="https://example.com/page.php"
and are not available when using:
action="page.php" (however page.php is loaded but not with $_POST).


What am I missing here?
Hope one of you understands what's happening.

Regards.

(PHP version 5.6.32, default Plesk Nginx and Apache settings)
 
Back
Top