<?php
require ('config.php');
$sql = "SELECT * FROM links ORDER BY id DESC";
?>
</font></p>
<table width="100%" border="0" cellpadding="0" cellspacing="0" bordercolor="#FF0000">
<tr>
<td width="66%" align="center"> </td>
</tr>
<?php
include('config.php');
$sql = "SELECT * FROM links ORDER BY id ASC";
<tr>
<td width="100%"><center><font
size="4"><a href="'.$obj->url.'">'.$obj->titel.'</font></a><center</td>
</tr>';}?>
</table>
<p align="center"> <font face="Mirror">
<?php
include ("config.php");
if ($_POST['Registreer'])
{ $datum =date('d/m/Y'); //datum if ($aantal_url > 0)
$error = "De url is al in gebruik";
if ($aantal_titel > 0)
$error = "Deze titel is al in gebruik";
if (!$error)
{ //als er geen error is dan maken we de query
$query ="INSERT INTO links (titel, url)
VALUES ('$titel', '$url')";
//query uitoefenen
echo"<div align=center>Je link is toegevoegd<br></div>";
} elseif ($error) {
?>
</font></p>
<div align="center">
<table width="51%" border="1" cellspacing="0" cellpadding="2">
<tr>
<td bordercolor="#000000" bgcolor="#990000" height="36"> <div align="center">
<p><font color=black size=-1 face=Mirror><b>
<?php echo $error; ?></b></font></p>
</div>
<form method="post" action="javascript:history.go(-1)">
<div align=center> <font face="Mirror">
<input type="submit" name="Terug" value="Terug">
</font></div>
</form></td>
</tr>
</table>
<font face="Mirror">
<?php
}
}
if (!$_POST['Registreer'])
{ ?>
</font>
<form method="post" action="">
<div align="center"><font size="4" face="Mirror">Titel</font> <font face="Mirror"><br>
<input name="titel" type="text"
size="20" maxlength="20">
</font>
<p></p>
</div>
<p align="center"> <font face="Mirror"><strong>Url</strong> <br>
<input name="url" type="text" value="http://"
size="35" maxlength="500">
</font></p>
<p align="center"> <font face="Mirror">
<input type="submit" name="Registreer" value="Voeg link toe">
</font></p>
<div align="center"></div>
</form>
<font face="Mirror">
<?php } ?>
</font>