Jump to content

need some asstaince with table display


webguync

Recommended Posts

  • Replies 80
  • Created
  • Last Reply

I am having a few issues with my form results page.

 

The employee name isn't displaying at all

 


<tr id="header"><th colspan="2" id="ResultsMessage">'.$message.'</th></tr>
<tr>
<td>Employee Name:'.$emp.'</td><td>Employee ID:'.$emp_id.'</td>
</tr>

 

the variables were set at the top of the page as

$emp = $_SESSION['emp_name'];
$emp_id = $_SESSION['emp_id'];

 

$message is set as

 

$message = 'Assessment Update results for '.$emp.',('.$emp_ID.')  submitted by '.$Assessor.','.$Assessor_ID.' on  '.$now;

 

$emp isn't displaying here either.

 

also how can I add html to $message. Whenever I try, I get an error

 

such as:

 

$message = 'Assessment Update results for '.$emp.',('.$emp_ID.')  submitted by '.$Assessor.','.$Assessor_ID.' on <span class="red"> '.$now</span>;

Link to comment
Share on other sites

<?php
echo'

<tr id="header"><th colspan="2" id="ResultsMessage">'.$message.'</th></tr>
<tr>
<td>Employee Name:'.$emp.'</td><td>Employee ID:'.$emp_id.'</td>
</tr>';


$message = "Assessment Update results for $emp,($emp_ID)  submitted by $Assessor,$Assessor_ID on $now";
?>

Link to comment
Share on other sites

that didn't make any difference.

 

I have on a previous page, a form with input checkboxes and a select menu to choose different people to select different boxes of information. When they submit the form, they are sent to the results page with information on which boxes they selected and the name they selected from the form on the previous page.

 

the information from the text boxes selected displays fine, but the variable for the name chosen to select on does not.

 

here is the code I am using for the select menu

 

<select name="emp_id" onchange="this.form.submit()" />
    ';
while(list($id,$name,$emp_id) = mysql_fetch_row($result)){
// this will select the current employee int he dropdown box
$selected = $id == $eid ? "selected" : "";
    echo '<option value="'.$id.'" '.$selected.' />'.$name.' (' .$emp_id.')</option>'."\n";
$_SESSION['employee_name'] = $name;
$_SESSION['emp_id'] = $id;
}
echo '</select>

 

and then on the results page:

 

<tr>
<td>Employee Name:'.$emp.'| Employee ID:'.$emp_id.'</td>
</tr>

 

the session information from the select menu is not coming through to the next page (results page).

 

 

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.


×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.