Php not receiving POST string

PirateSmack

New Member
I am trying to use the following function to post a single select option value to a \[code\]pChart\[/code\] page. When I try to check the form data in developer tools it suggests the \[code\]name:datastring\[/code\] pair is being posted to the PHP file. The Javascript file is as follows:\[code\]$(document).ready(function() { $('#players').on('change', function() { var dataString = $('#players option:selected').val(); $.post("../pChart2.1.3/AllPillarsCoach.php", {name:dataString}, "\nStatus: " + status); });});\[/code\]But it shows an empty array:\[code\]<?php echo "<pre>"; var_dump($_POST)."br /"; echo "</pre><br>"; ...?>\[/code\]I have checked with \[code\]GET\[/code\] as well with no success. I don't want a return to the browser as the PHP page renders an image and it doesn't appear too happy about being applied to a \[code\]div\[/code\].
 
Back
Top