THE CODE


<?php

$dbh = mysql_connect('localhost','root','password');
mysql_select_db('valgud');

$query = “SELECT * FROM menu DESC;”;
$totalresult = mysql_query($query, $dbh);

$query = “SELECT * FROM menu DESC;”;
$result = mysql_query($query, $dbh);


for($i = 0; $i < $menutotal; $i++) {
$tempvar = mysql_result($result,$i,“titill”);
$titill = $tempvar;

$tempvar = mysql_result($result,$i,“lysing”);
$lysing = $tempvar;

$tempvar = mysql_result($result,$i,“filename”);
$filename = $tempvar;
}

echo “<html>

<head><title>Menu</title></head>
<body>”;

echo “<p><a href=news.php>
<span onMouseOver=”text.value='Aftur á forsíðuna'“ onMouseOut=”text.value=''“>
<onMouseOver=”checkbrowser()“ target=”_main“>
Forsíða</a></span><br>”;

echo “<a href=$filename>
<span onMouseOver=”text.value='$lysing'“ onMouseOut=”text.value=''“>
<onMouseOver=”checkbrowser()“ target=”_main“>
$titill</a></span><br>”;

echo “<a href=links.php>
<span onMouseOver=”text.value='Skoða hlekkina'“ onMouseOut=”text.value=''“>
<onMouseOver=”checkbrowser()“ target=”_main“>
Hlekkir</a></span><br>”;

echo “<a href=mail.php>
<span onMouseOver=”text.value='Sendu okkur póst'“ onMouseOut=”text.value=''“>
<onMouseOver=”checkbrowser()“ target=”_main“>
Póstur</a></span></p>”;

echo “<p><TEXTAREA TYPE=Text scrollbars=no NAME=text rows=5 cols=9></textarea></p>”;

echo “</body>
</html>”;
?>

hvað er að?


valur