The code below is getting me info. from the database. One of the results - website - is supposed to enable clients to then link the block to a website. It gives me the link - but then this link goes to the index page within the same web and not where it says. can someone help. Thank you
<html>
<head>
<title>Displays</title>
</head>
<body>
<?php
$db_name = "xxxxxxx";
$table_name = "xxxxxxx";
$connection = @mysql_connect("xxxxxxxx.c
om", "xxxxxx", "xxxxxx") or
die("could not establish a connection");
$db = mysql_select_db($db_name, $connection) or die("could not select the database");
$sql = "
select cust_num,website,industry,
other,co_n
ame,email,
address,co
untry,city
,telephone
,
biz_desc
from $table_name
order by cust_num desc
";
$result = @mysql_query($sql, $connection) or die("could not execute query");
while ($row = mysql_fetch_array($result)
)
{
$website= $row['website'];
$industry = $row['industry'];
$other = $row['other'];
$co_name = $row['co_name'];
$email = $row['email'];
$address = $row['address'];
$country = $row['country'];
$city = $row['city'];
$telephone = $row['telephone'];
$biz_desc = $row['biz_desc'];
$display_block .= "
<p><strong><a href=\"$url\">$website</a>
</strong>.
......($in
dustry)...
....|.....
($other)..
.....
($co_name)...|...($email).
...|...($a
ddress)...
.|....($co
untry)....
|...($city
)...|...($
telephone)
..|
($biz_desc)
";
}
?>
<h2>New Displays</h2>
<?php echo "$display_block"; ?>
<p><a href="
http://easternafricatimes.com/cod/afro.php">Return
to Menu</a></p>
</body>
</html>
Start Free Trial