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?

Link to comment
Share on other sites

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>';
  
}
?>

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

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