I've run into a snag trying to insert the correct id into another table.
What's wrong with this?
$query1 = "INSERT INTO events (id, name, location, city, state, st_date, end_date, coachid, playerid, contactid, organizerid)
VALUES ('$id', '$eventname', '$location', '$city', '$state', '$startdate', '$enddate', '$id','$id','$id','$id')";
$query2 = "INSERT INTO user (id, username, password, accessid)
VALUES ('$id', '$coach_name', '$coach_pass', '$coach')";
$coachid = mysql_insert_id();
$query3 = "UPDATE events SET coachid = '$coachid' where id = '$id'";