Hi all, I created this page to add records to my database but now every time i go onto the venue_finder.php (the page you add records with) it adds a blank entry to my database... does anyone know a way to stop this? Please bear in mind I really am a n00b at this so clear replies would be SO greatly appreciated!
Thank you in advance!!!
<h1>Venue Finder </h1>
<p>Please fill in the details below to add a venue: </p>
<form action="venue_finder.php" method="post">
Venue:
<input type="text" name="venue">
<br>
Location:<label>
<select name="location">
<option>Somerset</option>
<option>Wiltshire</option>
<option>Dorset</option>
<option>Berkshire</option>
<option>Hampshire</option>
<option>East Sussex</option>
<option>Surrey</option>
<option>Isle of White</option>
</select>
</label>
<br>
Phone:
<input type="text" name="mobile"><br>
Web:
<input type="text" name="web"><br>
<input type="Submit">
</form>
<?
$username="*";
$password="";
$database="***";
$venue=$POST['venue'];
$phone=$POST['phone'];
$mobile=$POST['mobile'];
$web=$POST['web'];
mysql_connect(localhost,$username,$password);
@mysql_select_db($database) or die( "Unable to select database");
$query = "INSERT INTO venues VALUES ('','$venue','$phone','$mobile','$web')";
mysql_query($query);
mysql_close();
?>