hi, i am developing a toplist site, i have it fully working but... people can register multiple times with the same title, and password not so concerned about password but i dont want 50 of the same titled websites no it here is my code for inserting the data to the mysql database
<?php
include("config.php");
$sql="INSERT INTO sites (title, content, link, password)
VALUES
('$_POST[title]','$_POST[content]','$_POST[link]','$_POST[password]')";
if (!mysql_query($sql,$con))
{
die('Error: ' . mysql_error());
}
echo "Site has been registered. Please check the homepage.";
mysql_close($con)
?>
and here is the register form code (i dont think you need it though)
<form action="insert.php" method="post">
<table align="center" border="0" bordercolor="" style="background-color:" width="400" cellpadding="3" cellspacing="3">
<tr>
<td>Site name:</td>
<td><input type="text" name="title" /></td>
</tr>
<tr>
<td>Password:</td>
<td><input type="password" name="password" /></td>
</tr>
<tr>
<td>Link to site:</td>
<td><input type="text" name="link" /></td>
</tr>
<tr>
<td>Description:</td>
<td><textarea name="content" ></textarea></td>
</tr>
<input type="submit" value="Register" ></input>
</table>
</form>