Getting PHP global variables not working
Posted by: counterfoxx (88.211.33.---)
Date: August 28, 2015 03:12PM

Hi,

Yesterday I downloaded and installed WAMP on my Windows 7 64 bit machine. The only problem I had when installing it and getting it to work originally was that it wouldn't go from orange to green. Skype was locking this and the green icon came on after.

The installation was by default (WAMP chose the installation directory). In the document root I created a new directory with a HTML file and PHP file. The PHP file was suppose to just "print_r($_POST)" but the output was always an empty array.

I tried the same code on my webhost and it was working correctly.

Please can someone advise how to debug further?

Thanks.

Options: ReplyQuote
Re: Getting PHP global variables not working
Posted by: RiggsFolly (---.as43234.net)
Date: August 28, 2015 04:31PM

Hi,

Sorry I have to ask this.


Did the php script that just prints "print_r($_POST)" actually have a form in it that would have returned a $_POST?

ie `method="POST"`

and some actual `<input...>` fields?

Did you just enter its url into the browser, or did you press a submit button?

---------------------------------------------------------------------------------------------
(Windows 10 Pro 64bit) (Wampserver 3.3.4 64bit) Aestan Tray Menu 3.2.5.4
<Apache versions MULTIPE> <PHP versions MULTIPLE> <MySQL Versions MULTIPLE>
<MariaDB versions MULTIPLE> <phpMyAdmin versions MULTIPLE> <MySQL Workbench 8.0.23>

Read The Manuals Apache -- MySQL -- PHP -- phpMyAdmin
Get your Apache/MySQL/mariaDB/PHP ADDONs here from the WAMPServer alternate Repo
-X-X-X- Backup your databases regularly Here is How dont regret it later! Yes even when developing -X-X-X-

Options: ReplyQuote
Re: Getting PHP global variables not working
Posted by: counterfoxx (---.15-3.cable.virginm.net)
Date: August 31, 2015 03:22PM

Hi,

Thank you for your reply.

Yes the form had an action to the script which had the print_r($_POST). It had two text input fields which I entered values for and I was using a submit button on the form.

Thanks.

Options: ReplyQuote


Sorry, only registered users may post in this forum.