PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
I think all you have to do is put your echo statement within your while loop. Don't forget single quotes.
Try this:
<?php
include_once 'Connect.php';
if (!is_authed())
{
die ('You are not permitted to view this page, <a href="../index.php">click here</a> to go back.');
}
?>
<html><head>
<link href="style.css" rel="stylesheet" type="text/css">
<script src="scripts/ShowHint.js" type="text/javascript"></script>
</head>
<body>
<div class=logo><?php include "logo.php";?></div>
<div class=navigationbarbox><?php include "navigationbar.php";?></div>
<div class=linkbanner><?php include "linkbanner.php";?></div>
<div class=linkform>
<a href="loginform.php">add a link</a>
<?php
$query = ("SELECT * FROM links ");
$result= mysql_query ($query) or die ('Could not query.');
while ($row = mysql_fetch_assoc($query))
{
$linkto = $row["linkto"];
$src = $row["src"];
$alt = $row["alt"];
$width = $row["width"];
$height = $row["height"];
$text = $row["text"];
echo "<a href='$linkto'><img src='$src' alt='$alt' width='$width' height='$height' border='0'></a><br>";
}
?>
</div>
<div class=footerbox><?php include "footer.php";?></div>
</body></html>