Jump to content

need some asstaince with table display


webguync

Recommended Posts

  • Replies 80
  • Created
  • Last Reply

Top Posters In This Topic

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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • 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.