Click here to Skip to main content
14,883,063 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
ir....i have one table called 'name' having two values
i have to retrieve those data with a hyperlink and show in browser and if we click hyperlink its shows his sub categories....
how can i do it..help me sir its urgent.......?????
for example-in table 'name'
i have values in table C, C++ i have to retrieve and if i click C its sub categories should come and
if i click C++ its sub categories should come.
Sub categories will come from database.
Posted
Updated 5-Jul-12 23:57pm
v2
Comments
Mohibur Rashid 6-Jul-12 5:59am
   
The fact is everyone, who come here has an intention to help. But the question you ask says a lot of thing.
1. You probably don't know how to work on mysql with php
2. You don't know how method works.

it would be better if you show some skill. some of your work then people around here will be able to help you with the next step :)
kumar ankit1 6-Jul-12 6:02am
   
actually sir..i have retrievd data with hyperlink from database but i am not getting values from hyperlink.
Mohibur Rashid 6-Jul-12 7:49am
   
add code then. let us see
kumar ankit1 6-Jul-12 8:01am
   
this is code retrieving data with hyperlink

<!--?php
$result = mysql_query("SELECT * FROM aa order by name");

echo "<table align='center'?-->
<tr>
<th></th>
</tr>";

while($info = mysql_fetch_array( $result ))
{
echo "<tr>";
//echo "<td>" . $row['name'] . "</td>";

"<td>" . $info['name'] . "</td> ";
echo "<td> " .$info['name'] . "</td>";
echo "<td>" . $name . "</td>";


// $strLink = "" . $strNavn . "";
echo "</tr>";
}
echo "</table>";

mysql_close();
?>
and this code for getting sub categories
<div align="center">

SUB CATEGORY

</div>
<!--?php
// Get data from the database depending on the value of the id in the URL
$result = mysql_query("SELECT * FROM aa WHERE id=". $_GET['id'] );


echo "<table align='center'?-->
<tr>
<th></th>
</tr>";

// Loop the recordset $rs
while($row = mysql_fetch_array($result)) {

echo "<tr>";
//echo "<td>" . ''. $row['id'] .'' . "</td>";
// Write the data of the person
//echo "<td>" . $row['name'] . "</td>";
echo "<td>" . $row['sub_cat'] . "</td>";
echo "<td>" . $row['sub_cat1'] . "</td>";

echo "</tr>";
}
echo "</table>";
// Close the database connection
mysql_close();
?>

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900