MySQL Table inserts empty records before data

Cisecoleviriaa

New Member
I'm a beginner at this. Basically I have a form that has the correct names set up, and it sends the data to the MySQL table correctly, but it always inserts an additional 4 blank rows/ID's whenever I execute the form.Here's the result every time: http://i.stack.imgur.com/bnx5D.pngI'm not sure whether if there's something wrong with the code or the setup itself, can anybody help?PHP code:\[code\]<?php$email = $_POST['email'];$first_name = $_POST['first_name'];$last_name = $_POST['last_name'];$member_company = $_POST['member_company'];$member_address1 = $_POST['member_address1'];$member_address2 = $_POST['member_address2'];$member_city = $_POST['member_city'];$member_country = $_POST['member_country'];$member_post_code = $_POST['member_post_code'];$member_phone = $_POST['member_phone'];mysql_connect ("localhost", "username", "password") or die ('Error: ' . mysql_error());mysql_select_db ("database");$query="INSERT INTO Orders (ID, email, first_name, last_name, member_company, member_address1, member_address2, member_city, member_country, member_post_code, member_phone) VALUES ('NULL', '".$email."', '".$first_name."', '".$last_name."', '".$member_company."', '".$member_address1."', '".$member_address2."', '".$member_city."', '".$member_country."', '".$member_post_code."', '".$member_phone."')";mysql_query($query) or die ('Error updating database');?>\[/code\]
 
Back
Top