Rom Za Rom Za - 1 year ago 50
PHP Question

Taking name of staff member who choosed status

I have something like this

test1 OPEN
test3 CLOSED

It's something like a ticket systems. When I want to open for example subject test1 I have all informations like Who, when, etc and also I have question from customer and I can reply and set status to: OPEN, IN PROGESS, CLOSED etc.

And it works fine but I wanna one addition.

I wanna something like:

test1 OPEN by Name Surname
test2 IN PROGRESS by Name Surname
test3 CLOSED by Name Surname

When I setting status I wanna take Name and Surname from my Staff and display it in my ticket view.

here is code: Choose status

<select class="select2" name="status">
foreach($statuses as $status) : ?>

<option value="<?php echo $status['status']; ?>">Set to <?php echo ucwords($status['status']); ?> </option>

<?php endforeach; ?>

There is table like above:

<td><?php echo $ticket['subject'];?></td>
<td><?php echo $ticket['email'];?></td>
<td><?php echo ucfirst($ticket['status']);?></td>

I have bookmark Staff when I have all my "moderators"


How Can I set who changed the status?

Answer Source

The comments have more robust and better ideas, but this will probably get to where you want to go:

<option value="<?php echo $status['status'].' by '.$staff['name'].' '.$staff['surname']; ?>">Set to <?php echo ucwords($status['status']); ?> </option> 
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download