I've tried everything that I know of, to make the fields required.
The form is quite simple and small.
Here is the visual form code:
<form action="insert.php" method="post">
<table cellpadding="2" border="0">
<tr>
<td>Server Name:</td>
<td>IP:</td>
</tr>
<tr>
<td>
<input name="Name" type="text" />
</td>
<td>
<input name="IP" type="text" />
</td>
</tr>
<tr>
<td colspan="2"><?php
require_once('recaptchalib.php');
$publickey = "my public key";
echo recaptcha_get_html($publickey);
?>
</td>
</tr>
<tr>
<td colspan="2">
<input type="submit" />
</td>
</tr>
</table>
</form>
Here is insert.php:
<?php
$con = mysql_connect("host","username","password");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
mysql_select_db("tablename", $con);
$sql="INSERT INTO servers (Name, IP)
VALUES
('$_POST[Name]','$_POST[IP]')";
if (!mysql_query($sql,$con))
{
die('Error: ' . mysql_error());
}
echo "1 record added.";
mysql_close($con)
?>
All the database details have been replaced.