thomas2360 Posted March 20, 2011 Report Share Posted March 20, 2011 Hello everyone! I've got a problem with this code which is on the pilote public profile. <?php if(PilotGroups::group_has_perm(Auth::$usergroups, ACCESS_ADMIN)) { echo '<li><strong>Commentaires staff: </strong><?php echo PilotData::GetFieldValue($userinfo->pilotid, 'Commentaires staff');?></li> '; } ?> Thank you for your help! Quote Link to comment Share on other sites More sharing options...
James142 Posted March 20, 2011 Report Share Posted March 20, 2011 Hello everyone! I've got a problem with this code which is on the pilote public profile. <?php if(PilotGroups::group_has_perm(Auth::$usergroups, ACCESS_ADMIN)) { echo '<li><strong>Commentaires staff: </strong><?php echo PilotData::GetFieldValue($userinfo->pilotid, 'Commentaires staff');?></li> '; } ?> Thank you for your help! Im not sure if this will work, but you might need a closing tag: <?php } ?> Quote Link to comment Share on other sites More sharing options...
Administrators simpilot Posted March 20, 2011 Administrators Report Share Posted March 20, 2011 Hello everyone! I've got a problem with this code which is on the pilote public profile. <?php if(PilotGroups::group_has_perm(Auth::$usergroups, ACCESS_ADMIN)) { echo '<li><strong>Commentaires staff: </strong> <?php echo PilotData::GetFieldValue($userinfo->pilotid, 'Commentaires staff');?></li> '; } ?> Thank you for your help! You have php tags within already open php tags, you need to adjust the code around those instances. Quote Link to comment Share on other sites More sharing options...
thomas2360 Posted March 20, 2011 Author Report Share Posted March 20, 2011 I tried your solution but it doesn't work. Can someone correct me the php code, please? Thank you! Quote Link to comment Share on other sites More sharing options...
Guest lorathon Posted March 20, 2011 Report Share Posted March 20, 2011 Try this... <?php if(PilotGroups::group_has_perm(Auth::$usergroups, ACCESS_ADMIN)) { ?> <li><strong>Commentaires staff: </strong><?php echo PilotData::GetFieldValue($userinfo->pilotid, 'Commentaires staff');?></li> <?php } ?> or Try this... <?php if(PilotGroups::group_has_perm(Auth::$usergroups, ACCESS_ADMIN)) { echo '<li><strong>Commentaires staff: </strong>'.PilotData::GetFieldValue($userinfo->pilotid, 'Commentaires staff').'</li> '; } ?> Quote Link to comment Share on other sites More sharing options...
Tomgis34 Posted March 20, 2011 Report Share Posted March 20, 2011 Thanks for this solution. It works great. Quote Link to comment Share on other sites More sharing options...
thomas2360 Posted March 21, 2011 Author Report Share Posted March 21, 2011 Thank you so much sir! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.