Can anyone see why this query is inserted 4 times?

I only see one “mysql_query($memberquery);” Yet the record is inserted 4 times when I check the db. Anyone see why?

Thank you for your time!

[php]<?php
$link_register = 1;
session_start(user);
include(“header.php”);

$firstname     	= $_SESSION['firstname'];
$middleinitial  = $_SESSION['middleinitial'];
$lastname     	= $_SESSION['lastname'];
$phone     		= $_SESSION['phone'];
$email     		= $_SESSION['email'];
$street     	= $_SESSION['street'];
$city     		= $_SESSION['city'];
$state     		= $_SESSION['state'];
$categoryArray  = $_SESSION['categoryArray'];
$gender     	= $_SESSION['gender'];


$con = mysql_connect("localhost", "root", "");

if (!$con)
	{
	die("Could not connect: ". mysql_error());
	}
	
//The database is selected with the mysql_select_db() function.	
mysql_select_db("hobbyclub", $con);

//put the data insert into a varaible so it can be checked later
$memberquery = "INSERT INTO member (firstname, middleinitial, lastname, phone, email, street, city, state, gender) 
		VALUES ('$firstname', '$middleinitial', '$lastname', '$phone', '$email', '$street', '$city', '$state', '$gender')";


//insert the data
mysql_query($memberquery);

?>[/php]

Sponsor our Newsletter | Privacy Policy | Terms of Service