I am new to php and js and I am working on a simply on one webpage but i get stuck. What I am trying to do is next:
I am logging on the web
I am using the user id to retrieve data associated with that id from table in db. I am retrieving just the "name" column and using it as a hyperlink.
Here is my code:
$query = "SELECT * FROM cases WHERE id='".$_SESSION['id']."'";
$result=mysql_query($query) or die("Query Failed : ".mysql_error());
while($rows=mysql_fetch_array($result))
{
echo '<tr>
<td><ul><li><a href="casedetails.php">'.$rows['Name'].'</li></ul></td>
</tr>';
}
- It is retrieving data that is in the row named "name" in the table, and I want when i click on the hyperlink to save the name of the hyperlink (for ex. Murder(link to cases.php) ). because i want to use it in a query on the page of the hyperlink. I will appreciate if someone can help me!