Jump to content

how do i make a column link to mysql


frank_solo

Recommended Posts

Thanks JohnOP for the response. I got it to link to another page like so

echo "<td bgcolor='#FFFFFF' style='color: #000' align='center'><a href='classified/searchapts/index.php'" . $row['title'] . "'>".$row['title']."</a></td>";

My second question is how do i start to show the data on the href page for the item in the row. What function can I use or does anyone know of a good tutorial?

Ok I figured how to insert it to this

echo "<td bgcolor='#FFFFFF' style='color: #000' align='center'><a href='classified/searchapts/index.php?id=$title'>" . $row['title'] . "</a></td>";

but now what do I write in the page. In this case index.php to display the info of that row is it this

<?php
include "dbaptsConfig.php";
$query = mysql_query("SELECT * FROM apartments WHERE title ='$title'");
while($row = mysql_fetch_array($query)) {
  echo $row['title'];
  echo '<br>';
  echo $row['town'];
  echo '<br>';
  echo $row['rooms'];
  echo '<br>';
  
}
?>

Archived

This topic is now archived and is closed to further replies.

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