The following plugin code works fine for me locally running mamp and php 5.5.3, but returns nothing on our dev server running php 5.5.8:
$rating = ee()->input->post('rating');
return $rating;
Both environments are running EE 2.7.3. The template code is as follows:
<form id="ratingform" action="/globals/process-save-and-rate/{last_segment}/10/" method="post">
<input type="text" name="rating" id="rating" value="4">
<input type="hidden" name="XID" value="{XID_HASH}">
<button type="submit">Submit</button>
</form>
What is in 'process-save-and-rate' is as follows (and I know this should be a module to process the form):
{exp:switchee variable="{segment_4}" parse="inward"}
{case value="1"}
{exp:pp_general:save_property entry_id="{segment_3}" myaction="1"}
{/case}
{case value="2"}
{exp:pp_general:save_property entry_id="{segment_3}" myaction="2"}
{/case}
{case value="3"}
{exp:pp_general:save_property entry_id="{segment_3}" myaction="3"}
{/case}
{case value="10"}
{exp:pp_general:save_and_rate entry_id="{segment_3}"}
{/case}
{/exp:switchee}
If anyone can shed any light on why this is not working, I'd be very grateful. As I say, I'm just getting a blank screen whereas it should be outputting the value of the $rating variable.
Secure forms is turned on in EE. Turning it off and removing the XID hash gives the same result.
I'm not seeing any php errors so am a bit stumped.
Jim