<?php
require('include/header.php');
//read out the faqs
?>
<table class="table" width="640">
<tr class="table_header">
<th class="table_header" colspan="2">
<p align="left">Add a link</th>
</tr>
<tr>
<td class="cell_content">
<?php
//read out the faqs
if ($_POST[category] == 0) {
echo "<br><font color='#FF0000'>You have to select a category.</font><br><br>";
} elseif ($_POST[name] == "") {
echo "<br><font color='#FF0000'>You have to fill in a name.</font><br><br>";
} elseif ($_POST[email] == "") {
echo "<br><font color='#FF0000'>You have to fill in a name.</font><br><br>";
} elseif ($_POST[url] == "") {
echo "<br><font color='#FF0000'>You have to fill in a name.</font><br><br>";
} else {
$sql="INSERT INTO ".$prefix."request (req_category, req_name, req_url, req_description, req_email)
VALUES
('$_POST[category]','$_POST[name]','$_POST[url]','$_POST[description]','$_POST[email]')";
if (!mysql_query($sql))
{
die('Error: ' . mysql_error());
}
echo "Your link is succesfully added to the database.";
}
?>
</span></td>
</tr>
</table>
<?php
//end read out the faqs
require('include/footer.php');
?>