• Introducing WebPros Cloud - a fully managed infrastructure platform purpose-built to simplify the deployment of WebPros products !  WebPros Cloud enables you to easily deliver WebPros solutions — without the complexity of managing the infrastructure.
    Join the pilot program today!
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.

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