Hi all,
A newbie here, but loving this stuff.
Im a little stuck though. and need some help.
So far I am writing a basic script to query a mysql db and return results, but am getting stuck.
Here is the main part im stuck on.
'Where ive marked #######'s.
//if you want to see employee details then display one employees details
if(isset($showdetails)){
###############
###############
}
else{
//display all employees with name and link to more details on each.
while($row=mysql_fetch_array($result)){
$id=$row["ID"];
$firstname=$row["FirstName"];
$surname=$row["Surname"];
echo("<p>$firstname" . " " . "$surname".
" <a href='$PHP_SELF?showdetails=$id'>"."See This Employees Details</a></p>");
}
}
It is a basic script to call all employees listed in a table.
I have worked out how to display all employees, but i want to be able to click on the employee name and be taken to more detailed results on that employee... I am using $PHP SELF to take it back to the same page with the url determining the ID of the row.
How do i show the employee details of the employee i clicked on?
thanks in advance!