link to detailed page

I am working on a product inventory website in which i want to show a list of a certain type of product and then provide a link to more detailed information regarding a specific product.
However, I can’t get the individual link to work, it keeps shutting down the whole page.

[php]<?php
$query = mysql_query(“SELECT * FROM presses WHERE type = ‘upsetter’”);

echo "<table border='1' id='presses' class='presses'>
	<tr>
	
	</tr>";
while($row = mysql_fetch_array($query))

{
echo “

”;
echo “” . $row[‘name’]. " View Press Details ";
echo " ";
echo " View Press Profile "
echo “”;
}
echo “”;
mysql_close($connection);

?>[/php]

the bold is the line I am having issues with. I have tried making it its own cell, its own paragraph. Nothing seems to work. Any help would be appreciated.

Thanks!

From what I see in your code, you need to concatenate closing at the end, just like you did in the beggining

SO:

[php]echo “

” . $row[‘name’]. " View Press Details ";[/php]

SHOULD BE:

[php]

echo “

” . $row[‘name’]. “View Press Details[/b]” . “” ;[/php]

Try that to see if it helps.

Another thing, when posting in this forum, you can’t bold stuff inside the “php code insertion tags” ebcause it is just going to display it as part of the code and it might throw some people off when trying to help.

OK, I spotted the main issue with your code. It’s inconsistent concatenation.

[php]echo “

” . $row[‘name’]. " View Press Details ";
[/php]

SHOULD NOW BE:
[php]echo “

”.$row[‘name’]. “<a href=‘profile.php?id=.’”.$row[“id”]." '>View Press Details" ."";[/php]

The problem resides in your code, more specifically, needs to be adjusted like this:
“<a href='profile.php?id=.’”.$row[“id”]." '>

You cannot have same same type quote marks sequencially without concatenation as you did here:
[size=14pt]"[/size]<a href=[size=14pt]"[/size]profile.php?id=$row[‘id’][size=14pt]"[/size]>, plus you needed to concatenated $row id since is a variable.

Sponsor our Newsletter | Privacy Policy | Terms of Service