hi
i have a problem i need the same thing pop up a windoow when user clicks the link
hear is my code plz tell me if i made a mistake

<html>
<head>
</head>
<body>
<?
$company= $_REQUEST['companytype'];
$companytype =mysql_real_escape_string($company);
echo "<h1> <font color=green>Results For $companytype</font></h1>";
$query = "SELECT companyname,companytype,address,kommun,postcode,telephone
FROM addreg where companytype ='$companytype' ORDER BY id desc limit 0,5";
$result = mysql_query($query);
echo mysql_error();
echo "<table width='100%' border='0'>";


while($row = mysql_fetch_array($result))
{
echo "Companytype :"."<a href= 'houseinfo.php?companytype=".$row["companytype"]."'></a>". "<br>";
echo "Companyname : " .$row['companyname'] . '<br>';
echo "Address : " .$row['address'] . '<br>';
echo "Telephone : " .$row['telephone'] . '<br>';
echo "<img src='img/divv.jpg'>"."<br>";
}
echo '<br>';
?>
</body>
</html>

when the user clicks the 'companyname' a window should pop out showing the details ,but i dont output anything can some one help.

Do you just want the link to open in a new window? (new tab in newer browsers) Or are you wanting a 'pop-up box'?

Sam

just want to pop up a box which also display the image of the company

Ah, I see.

You closed your </a> before the Company Name.

So where you have

echo "Companytype :"."<a href= 'houseinfo.php?companytype=".$row["companytype"]."'></a>". "<br>";
echo "Companyname : " .$row['companyname'] . '<br>';

you should have

echo "Companytype : <a href= 'houseinfo.php?companytype=".$row["companytype"]."'><br>";
echo "Companyname : " .$row['companyname'] . '</a><br>';

Assuming I've understood correctly, that should be it, now.

Sam

This article has been dead for over six months. Start a new discussion instead.