Welcome Guest, Not a member yet? Register   Sign In
condition based action should be changed?
#1

I am using table row details with action column  . In this action once process completed show "completed button" otherwise show  edit icon. 

need suggestion.

Attached Files Thumbnail(s)
   
Reply
#2

Simply use if … else …, or the ? : operator.
PHP Code:
<?php 
$actionbutton 
$row['status'] == 'finished' anchor('link1','Completed','class="btn"') : anchor('link2','Edit','class="btn"');
?>

<td><?= $actionbutton;?></td> 
Reply




Theme © iAndrew 2016 - Forum software by © MyBB