Hi, I'm populating a recordset from mysql using php5, this recordset is show using html table, just as the next code show you:
<TABLE border='2'>
<tr><td>Nombres</td><td>Apellidos</td><td>Nivel Academico</td><td>NIT</td><td>NUP</td></tr>
<?php
while($xrsa = mysqli_fetch_assoc($resa)) {
echo "<tr><td><a href='verarc.php?xb=' " . $xrsa['nombres'] . " '>" .$xrsa['nombres'] . "</a></td><td>" . $xrsa['apellidos'] . "</td><td>" . $xrsa['nivacad'] . "</td><td>" . $xrsa['nit'] . "</td><td>" . $xrsa['nup']. "</td></tr>";
}
?>
</TABLE>
So, I'm having serious problems doing the next:
I want the user can do a click in the name of each employee, after he/she did click the entire profile can be displayed, but i don't have success to pass the value of the employee's name to the 'verarc.php', the main code line that i have the problem is:
echo "<tr><td><a href='verarc.php?xb=' " . $xrsa['nombres'] . " '>" .$xrsa['nombres'] . "</a></td><td>"
the verarc.php has the next code lines:
<?php
$id=$_GET[ 'xb' ];
echo "el valor clicado es: " . $id;
?>
So, guys I don't know how to fetch the value of the employee's name in this sentence: <a href='verarc.php?xb=' " . $xrsa['nombres'] . " '>" because in the verarc.php the variable $id is always in blank.
So, could youy help me whit this?
thanks