Jump to content

Creating dynamic links


witham

Recommended Posts

Hi I am hoping someone out there can help me with the final piece to a php script I am creating, let me explain.

 

I have a page that allows users to query a database using two drop down boxes populated dynamically the page that processes the results of this query shows the data in a table. One of the columns of this table contains data which I really want to be links to files

 

This is what I have presently but the link doesn't work when I click it??

 

 

// mysql_fetch_array fetches the results from the query a row at a time using a while loop each time it's called
// the result is returned as an array that can be referenced either by field name or by it's index
while ($row = mysql_fetch_array ($result)) 
// loop through the rows outputing them as html table rows


{

// $row["fieldname"] returns the content for the field in the current row

   	echo "<tr><td>" .$row["MANNAME"].  "</td>";

   	echo "<td>"   .$row["prodtype"].  "</td>";

   	echo "<td>"   .$row["proddesc"].  "</td>";

echo "<td><a href>"   .$row["Compsheet"].	"</td>";

   	echo "<td>"   .$row["prodequiv"].  "</td></tr>";



}


// close html table tag
echo "</table>\n";

 

 

Thanks

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.