Hey Mark,
I actually was using an echo but it returned a blank.
Here’s what I’m trying to do:
I created a channel for users to upload profile photos. In a certain template, a user can view all of the profile photos he/she has uploaded. I wrote a plugin to check each photo’s filename against the user’s current avatar.
if ($photo_filename == $row['avatar_filename'])
{
$avfilename = $row['avatar_filename'];
$this->return_data = "<input type=\"radio\" name=\"avatar_filename\" value=\"$avfilename\" class=\"profile_pic_btn\" checked=\"checked\">";
}
else
{
$avfilename = $row['avatar_filename'];
$this->return_data = "<input type=\"radio\" name=\"avatar_filename\" value=\"$avfilename\" class=\"profile_pic_btn\">";
}
If the 2 filenames match, a radio button returns as checked. If they don’t match, a radio button returns as unchecked. Basically anytime a user goes to this page, the radio buttons indicate which photo is their current avatar. The user can click a radio button to choose a different profile photo and hit the submit button which then redirects them to another template that updates ‘avatar_filename’ in exp_members.
The template being redirected to is the one giving me a problem. I’m not getting ‘avatar_filename’ from the form.
<?php $value = $this->EE->input->post('avatar_filename'); ?>
doesn’t work. Neither does
$value = $_POST('avatar_filename');
which gives me a “Fatal error: Function name must be a string”.
Could it be because ‘avatar_filename’ is coming from a plugin???