Location: PHPKode > projects > GolfstatsPHP > golfstatsphp_3.0/scorecardedit.php
<?

include("dbasecon.inc.php");

include("session.inc.php");

include ("header1.php");

include ("score_functions.inc.php");

include ("userfunctions.inc.php");





//if there's a date being passed

if ($HTTP_GET_VARS['gamedateedit'])

{

$gamedate=$gamedateedit;

//format this

$day=substr("$gamedate", 8, 2);

$month=substr("$gamedate", 5, 2);

$year=substr("$gamedate", 0, 4); 



} else {



//first we format the date!

$gamedate="$year-$month-$day";

//first get the game_id

}//endif httpgetvars gamedateedit

$gamedate2=str_replace("-", "", "$gamedate");





$gameid = $gamedate2.$courseid;



//we need some functions here to count GIR and check putts are valid

if ($calculate) {

$hole=0;





do {

$hole++;

$par_hole_check=par_hole.$hole;

$putt_check=putt.$hole;

$gross_check=gross_score.$hole;

$gir_check=gir.$hole;



//check, make sure the putt is never more than the stroke

if ((${$putt_check} >= ${$gross_check}) && (${$putt_check} <> "na")) {

$error_count=1;

} else {



$error_count=0;

}//endif puttcheck



} while ($hole<18);











}//endif calculate





//check if game exist, else barfs



$gamesql="select * , date_format(date,'%d/%m/%Y') as real_date from games LEFT JOIN courses 

					ON games.courseid=courses.courseid   

					where games.userid = '$login_id'

					 AND games.gameid='$gameid'";



				$gamequery=mysql_query($gamesql);

				$gamerow=mysql_fetch_array($gamequery);

				$gameexist=mysql_numrows($gamequery);





				$gamehandicap=$gamerow['handicap'];

				$coursename=$gamerow['coursename'];

				$courseid=$gamerow['courseid'];

				$courselength=$gamerow['courselength'];

				$front9length=$gamerow['front9length'];

				$back9length=$gamerow['back9length'];



				$out_par=$gamerow['front9'];

				$in_par=$gamerow['back9'];

				$total_par=$gamerow['coursepar'];

				$total_eighteen=$gamerow['gross_score'];

				$total_net=$gamerow['net_score'];

				$total_stableford=$gamerow['stableford'];

				$total_fairway=$gamerow['fairway_hit'];

				$total_gir=$gamerow['gir'];

				$total_putts1=$gamerow['total_putts'];

				$longest_drive=$gamerow['longest_drive'];

				$real_date=$gamerow['real_date'];

							



				



?>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">



<? showheader("Score Card Edit"); ?>

<p>







<!----------------Begin Display Section--------------------------------->

<p>



<?



$coursesql="Select * from courses  

					where courseid = '$courseid' ";



				

				$coursequery=mysql_query($coursesql);

				$courserow=mysql_fetch_array($coursequery);

	 			$courseexist=mysql_numrows($coursequery);



				$courselength=$courserow["courselength"];

				$back9length=$courserow["back9length"];

				$front9length=$courserow["front9length"];



				$coursename=$courserow["coursename"];

				$sloperating=$courserow["sloperating"];

				$courserating=$courserow["courserating"];



$coursesql="select * from courses where courseid='$courseid'";



				$coursequery=mysql_query($coursesql);

				$courserow=mysql_fetch_array($coursequery);

				$courseexist=mysql_numrows($coursequery);

				

				$coursename=$courserow['coursename'];

				$courseid=$courserow['courseid'];

				$out_par=$courserow['front9'];

				$in_par=$courserow['back9'];







				//check if this is tournament

				if ($tournament==1){

				$tourneygame="YES";

				} else {

				$tourneygame="NO";

				}

?>



<table border=1 cellpadding="5">

<tr class="menu-bg"><td>

Name</td><td>Date</td><td>Handicap</td><td>Game ID</td><td>Course</td><td>Slope</td><td>Rating</td><td>Tournament</td>

</tr>

<tr>

<td><? echo $username;?></td><td><? echo "$day/$month/$year";?></td><td><? echo $handicap;?></td>

<td><? echo $gameid;?></td><td><? echo $coursename;?></td><td><? echo $sloperating; ?></td><td><? echo $courserating; ?></td>

<td><? echo $tourneygame; ?></td>

</tr>

</table>





<p>



<?

//to display any error messages

if ($error_count == 1) {



echo "<p class='error'>Your putts must be less than your stroke!</p>";



}

?><p>







<table border=1>

<tr class="menu-bg">

<td>Hole</td><td><? echo $measure; ?></td><td>Par</td><td>Index</td><td>Gr.Score</td><td>Gr.Name</td><td>Net.Score</td>

<td>Net.Name</td><td>Stableford</td><td>Fairway Hit</td><td>GIR</td><td>Putt</td><td>Drive Distance</td><td>Teeoff Club</td>

</tr>

<?









//this is the MAIN IF statement for display!!

if ($courseexist) {



if ((!$calculate) || ($confirm) || ($error_count==1)) { 

$confirm_disable="DISABLED";

}else {

$confirm_disable="";

}



//the loop that outputs SQL query into nice tably forms	 

$hole=0;

//$out_par=0;

//$in_par=0;

$out_nine=0;

$in_nine=0;

$out_net=0;

$in_net=0;

$out_stableford=0;

$in_stableford=0;

$out_putts=0;

$in_putts=0;



$out_fairway=0;

$in_fairway=0;

$out_gir=0;

$in_gir=0;



$out_drive=0;

$in_drive=0;

$out_drive_distance=0;

$in_drive_distance=0;

$error_count=0;



//here comes the stats!

do {





$hole=$hole+1;

//$par_hole_check=par_hole.$hole;

//$putt_check=putt.$hole;

//$gross_check=gross_score.$hole;

//$gir_check=gir.$hole;



//count the gir!

//now count the GIR!



//ok, the hole par is a GIR if grossscore-putts=parhole-2

//if ((${$gross_check} - ${$putt_check}) <= (${$par_hole_check}-2)) {

//$gir=1;

//} else {

//$gir=0;

//}



//this creates variables according to the field names in the table. Lazy way to populate vars.





extract($courserow);



if (!$calculate) {

$table="hole$hole";



$holesql="Select * from $table where gameid='$gameid' and userid='$login_id'";

				$holequery=mysql_query($holesql);

				$holerow=mysql_fetch_array($holequery);

				$holeexist=mysql_numrows($holequery);



extract($holerow);



$par_hole=parhole.$hole;

$lengthhole=lengthhole.$hole;

$index_hole=indexhole.$hole;

$gross_score=$gross;

$fairway=$fairway_hit;

$net_score=$net;

$putt=$putt;

$drive=$drive_distance;

$tee_club=$teeclub;

$stableford=$stableford_pts;



if ($fairway == 1) {

$fw_checkbox="CHECKED";

} else {

$fw_checkbox="";

}



if ($gir == 1) {

$gir_checkbox="CHECKED";

} else {

$gir_checkbox="";

}



$error_count=0;





//count the out or in par and index

if ($hole<=9) {

//$out_par=$out_par+$parhole_current;

$out_nine=$out_nine+$gross_score;

$out_net=$out_net+$net_score;

$out_stableford=$out_stableford+$stableford;

$out_putts=$out_putts+$putt;

$out_drive_distance=$out_drive_distance+$drive;

$out_strokes=$out_nine-$out_par;

$net_out_strokes=$out_net-$out_par;



		if ($out_strokes > 0) {

		$out_strokes="+$out_strokes";

		

		}

		if ($net_out_strokes > 0) {

		$net_out_strokes="+$net_out_strokes";

		

		}



		if ($fairway == 1) {

		$out_fairway=$out_fairway+1;

		}



		if ($gir == 1) {

		$out_gir=$out_gir+1;

		}

		if (($drive > $out_drive) && ($drive<>"na")) {

		$out_drive=$drive;		

		}

} else {



//$in_par=$in_par+$parhole_current;

$in_nine=$in_nine+$gross_score;

$in_net=$in_net+$net_score;

$in_stableford=$in_stableford+$stableford;

$in_putts=$in_putts+$putt;

$in_drive_distance=$in_drive_distance+$drive;

$in_strokes=$in_nine-$in_par;

$net_in_strokes=$in_net-$in_par;

		if ($in_strokes > 0) {

		$in_strokes="+$in_strokes";



		}



			if ($net_in_strokes > 0) {

		$net_in_strokes="+$net_in_strokes";

		

		}



		if ($fairway == 1) {

		$in_fairway=$in_fairway+1;

		}



		if ($gir == 1) {

		$in_gir=$in_gir+1;

		}

		

		if (($drive > $in_drive) && ($drive <> "na")){

		$in_drive=$drive;		

		}



}



echo "<p>";







} else { //if calculate





//OK, begin calculation!!!



$parhole_current=${$par_hole};



//1.get the gross name

$gross_name=get_name($parhole_current,$gross_score);



//2.get the netscore according to the handicap

$net_score=count_net($handicap,$gross_score,${$index_hole});

//3.get the NET name

$net_name=get_name($parhole_current,$net_score);



//4.Count stableford points

$net_name2=str_replace(" ", "_", $net_name);



$pointssql="Select * from stableford  

					where score = '$net_name2' ";



				

				$pointsquery=mysql_query($pointssql);

				$pointsrow=mysql_fetch_array($pointsquery);

	 			$pointsexist=mysql_numrows($pointsquery);



				$stableford=$pointsrow["points"];



				

//5. if drive and putt empty, then mark n/a



if (!$drive) {

$drive="na";

}				

if (!$putt) {



if ($putt == "0") {

$chip_ins=$chip_ins+1;

} else {

$putt="na";

}				

}

//count the out or in par and index



if ($hole<=9) {

//$out_nine=0;

//$out_net=0;

//$out_stableford=0;

//$out_putts=0;

//$out_drive_distance=0;

//$out_strokes=0;

//$net_out_strokes=0;



//$out_par=$out_par+$parhole_current;

$out_nine=$out_nine+$gross_score;

$out_net=$out_net+$net_score;

$out_stableford=$out_stableford+$stableford;

$out_putts=$out_putts+$putt;

$out_drive_distance=$out_drive_distance+$drive;

$out_strokes=$out_nine-$out_par;

$net_out_strokes=$out_net-$out_par;



		if ($out_strokes > 0) {

		$out_strokes="+$out_strokes";

		

		}

		if ($net_out_strokes > 0) {

		$net_out_strokes="+$net_out_strokes";

		

		}



		if (${$fairway} == 1) {

		$out_fairway=$out_fairway+1;

		}



		

		if ($gir == 1) {

		$out_gir=$out_gir+1;

		}

		

		if (($drive > $out_drive) && ($drive<>"na")) {

		$out_drive=$drive;		

		}

} else {



//$in_par=$in_par+$parhole_current;

$in_nine=$in_nine+$gross_score;

$in_net=$in_net+$net_score;

$in_stableford=$in_stableford+$stableford;

$in_putts=$in_putts+$putt;

$in_drive_distance=$in_drive_distance+$drive;

$in_strokes=$in_nine-$in_par;

$net_in_strokes=$in_net-$in_par;

		if ($in_strokes > 0) {

		$in_strokes="+$in_strokes";



		}



			if ($net_in_strokes > 0) {

		$net_in_strokes="+$net_in_strokes";

		

		}



		if (${$fairway} == 1) {

		$in_fairway=$in_fairway+1;

		}



		if ($gir == 1) {

		$in_gir=$in_gir+1;

		}

		

		if (($drive > $in_drive) && ($drive <> "na")){

		$in_drive=$drive;		

		}



}

				

//count total!

$total_par_hole=$out_par+$in_par;

$total_eighteen=$out_nine+$in_nine;

$total_net_hole=$out_net+$in_net;

$total_stableford=$out_stableford+$in_stableford;

$total_putts=$out_putts+$in_putts;

$total_fairway=$out_fairway+$in_fairway;

$total_gir_hole=$out_gir+$in_gir;

$total_strokes=$out_strokes+$in_strokes;

$total_net_strokes=$net_out_strokes+$net_in_strokes;



			if ($total_strokes > 0) {

		$total_strokes="+$total_strokes";

		

		}



			if ($total_net_strokes > 0) {

		$total_net_strokes="+$total_net_strokes";

		

		}

		

if ($in_drive > $out_drive) {

$total_drive=$in_drive;

} else {



$total_drive=$out_drive;

}



//alrite, now lets chuck into the dbase!





} //endif calculate





?>









<?




echo "<form method=\"post\" action=\"$PHP_SELF\" onSubmit=\"return checkrequired(this)\">";

echo "<tr><td>$hole</td><td>${$lengthhole}</td><td>${$par_hole}</td><td>${$index_hole}</td>";

echo "<td><input type=\"text\" maxlength=\"2\" size=\"2\" name=\"gross_score$hole\" value=\"$gross_score\"></td>";

echo "<td><input type=\"text\" maxlength=\"12\" size=\"15\" name=\"gross_name\" value=\"$gross_name\" disabled></td>";

echo "<td><input type=\"text\" maxlength=\"2\" size=\"2\" name=\"net_score\" value=\"$net_score\" disabled></td>";

echo "<td><input type=\"text\" maxlength=\"12\" size=\"15\" name=\"net_name\" value=\"$net_name\" disabled></td>";

echo "<td><input type=\"text\" maxlength=\"3\" size=\"3\" name=\"stableford\" value=\"$stableford\" disabled></td>";

echo "<td><input type=\"checkbox\" name=\"fairway$hole\" value=\"1\" $fw_checkbox></td>";

echo "<td><input type=\"checkbox\" name=\"gir$hole\" value=\"1\" $gir_checkbox disabled></td>";

echo "<td><input type=\"text\" maxlength=\"2\" size=\"2\" name=\"putt$hole\" value=\"$putt\"></td>";

echo "<td><input type=\"text\" maxlength=\"3\" size=\"3\" name=\"drive$hole\" value=\"$drive\"></td>";







echo "<td><select name='teeclub$hole'>";



//club selection

$clubsql="Select * from clubs  

					order by teeoff ASC ";

$clubquery=mysql_query($clubsql);

$clubrow=mysql_fetch_array($clubquery);	





do {





$teeclub1_temp = $clubrow["clubid"];



if ($teeclub1_temp==$tee_club) { $selected = "SELECTED";

} else {

$selected = "";

}





//OK, populate the drop down on the row.

printf("<option value=\"%s\" $selected > %s",

$clubrow["clubid"], $clubrow["clubs"]);



 																																																			 

} while ($clubrow=mysql_fetch_array($clubquery));









?>

</select>





</td>

<?

echo "<input type=\"Hidden\" name=\"courseid\" value=\"$courseid\">";

echo "<input type=\"Hidden\" name=\"gameid\" value=\"$gameid\">";

echo "<input type=\"Hidden\" name=\"gamedate\" value=\"$gamedate\">";

echo "<input type=\"Hidden\" name=\"handicap\" value=\"$handicap\">";

echo "<input type=\"Hidden\" name=\"username\" value=\"$username\">";

echo "<input type=\"Hidden\" name=\"day\" value=\"$day\">";

echo "<input type=\"Hidden\" name=\"month\" value=\"$month\">";

echo "<input type=\"Hidden\" name=\"year\" value=\"$year\">";

echo "<input type=\"Hidden\" name=\"par_hole$hole\" value=\"${$par_hole}\">";





echo "</tr>";	 



if ($hole==9) {

echo "<tr class='menu-bg'><td>OUT</td><td>$front9length</td><td>$out_par</td><td>INDEX</td>";

echo "<td>$out_nine</td>";

echo "<td>";

echo "$out_strokes</td>";

echo "<td>$out_net</td>";

echo "<td>$net_out_strokes</td>";

echo "<td>$out_stableford</td>";

echo "<td>$out_fairway</td>";

echo "<td>$out_gir</td>";

echo "<td>$out_putts</td>";

echo "<td>$out_drive *</td>";

echo "<td>&nbsp;</td>";



echo "</tr>";



} //endif hole9







}while ($hole<18); //end while. Elegant code!



echo "<tr class='menu-bg'><td>IN</td><td>$back9length</td><td>$in_par</td><td>INDEX</td>";

echo "<td>$in_nine</td>";

echo "<td>$in_strokes</td>";

echo "<td>$in_net</td>";

echo "<td>$net_in_strokes</td>";

echo "<td>$in_stableford</td>";

echo "<td>$in_fairway</td>";

echo "<td>$in_gir</td>";

echo "<td>$in_putts</td>";

echo "<td>$in_drive *</td>";

echo "<td>&nbsp;</td>";



echo "</tr>";



echo "<tr class='menu-bg'><td>OUT</td><td>$front9length</td><td>$out_par</td><td>INDEX</td>";

echo "<td>$out_nine</td>";

echo "<td>$out_strokes</td>";

echo "<td>$out_net</td>";

echo "<td>$net_out_strokes</td>";

echo "<td>$out_stableford</td>";

echo "<td>$out_fairway</td>";

echo "<td>$out_gir</td>";

echo "<td>$out_putts</td>";

echo "<td>$out_drive *</td>";

echo "<td>&nbsp;</td>";

		 

echo "</tr>";



//some cleanup to make sure putts and drive are na if it is 0

if (!$total_drive) {

$total_drive="na";

}				



if (!$total_putts) {



$total_putts="na";

}



//count total!

$total_par_hole=$out_par+$in_par;

$total_eighteen=$out_nine+$in_nine;

$total_net_hole=$out_net+$in_net;

$total_stableford=$out_stableford+$in_stableford;

$total_putts=$out_putts+$in_putts;

$total_fairway=$out_fairway+$in_fairway;

$total_gir_hole=$out_gir+$in_gir;

$total_strokes=$out_strokes+$in_strokes;

$total_net_strokes=$net_out_strokes+$net_in_strokes;



			if ($total_strokes > 0) {

		$total_strokes="+$total_strokes";

		

		}



			if ($total_net_strokes > 0) {

		$total_net_strokes="+$total_net_strokes";

		

		}

		

if ($in_drive > $out_drive) {

$total_drive=$in_drive;

} else {



$total_drive=$out_drive;

}



echo "<tr class='menu-bg'><td>TOTAL</td><td>$courselength</td><td>$total_par_hole</td><td>INDEX</td>";

echo "<td>$total_eighteen</td>";

echo "<td>$total_strokes</td>";

echo "<td>$total_net_hole</td>";

echo "<td>$total_net_strokes</td>";

echo "<td>$total_stableford</td>";

echo "<td>$total_fairway</td>";

echo "<td>$total_gir_hole</td>";

echo "<td>$total_putts</td>";

echo "<td>$total_drive *</td>";

echo "<td>&nbsp;</td>";



echo "</tr>";













echo "</table><p>";



echo "<input type=\"Hidden\" name=\"out_drive\" value=\"$out_drive\">";

echo "<input type=\"Hidden\" name=\"in_drive\" value=\"$in_drive\">";

echo "<input type=\"Hidden\" name=\"out_drive_distance\" value=\"$out_drive_distance\">";

echo "<input type=\"Hidden\" name=\"in_drive_distance\" value=\"$in_drive_distance\">";

echo "<input type=\"Hidden\" name=\"out_putts\" value=\"$out_putts\">";

echo "<input type=\"Hidden\" name=\"in_putts\" value=\"$in_putts\">";

echo "<input type=\"Hidden\" name=\"error_count\" value=\"$error_count\">";

echo "<input type=\"Hidden\" name=\"total_gross1\" value=\"$total_eighteen\">";

echo "<input type=\"Hidden\" name=\"total_net1\" value=\"$total_net_hole\">";

echo "<input type=\"Hidden\" name=\"total_stableford1\" value=\"$total_stableford\">";

echo "<input type=\"Hidden\" name=\"total_fairway1\" value=\"$total_fairway\">";

echo "<input type=\"Hidden\" name=\"total_gir1\" value=\"$total_gir_hole\">";

echo "<input type=\"Hidden\" name=\"total_putts1\" value=\"$total_putts\">";

echo "<input type=\"Hidden\" name=\"longest_drive1\" value=\"$total_drive\">";



echo "<input type=\"Hidden\" name=\"tournament\" value=\"$tournament\">";

echo "<input type=\"Hidden\" name=\"calculate\" value=\"$calculate\">";

echo "<input type=\"Submit\" name=\"calculate\" value=\"Calculate Score\">";

echo "&nbsp;<input type=\"Submit\" name=\"confirm\" value=\"Confirm Score\" $confirm_disable>";

echo "</form>";









if ($confirm) {



//first delete anything with the existing gameid and userid



$gamedelsql= "Delete From games where (gameid='$gameid' and userid='$login_id')";

	$gamedelresult=mysql_query($gamedelsql);

	

//now add	



 $gameaddsql = "Insert into games

	 						(gameid, userid, date, courseid, handicap,gross_score,net_score,stableford,fairway_hit,gir,total_putts,longest_drive,chipins,tournament) VALUES 

	 						('$gameid','$login_id','$gamedate', '$courseid', '$handicap','$total_gross1',

							'$total_net1','$total_stableford1','$total_fairway1','$total_gir1','$total_putts1','$longest_drive1','$chip_ins','$tournament')";

			$gameaddresult=mysql_query($gameaddsql);







//9.putts per round

				$stat5sql="Select * from games 

					where userid = '$login_id'

					 ORDER BY longest_drive ASC";

				$stat5query=mysql_query($stat5sql);

				$stat5row=mysql_fetch_array($stat5query);

				$stat5exist=mysql_numrows($stat5query);

				$longest_drive1=0;

				$total_putts1=0;

				

				do {

				extract($stat5row);

				

				if ($total_putts <> "na") {				

				$total_putt_rounds=$total_putt_rounds+1;

				$total_putts1=$total_putts1+$total_putts;

				} //endif



				

				//34.longest drive

				if (($longest_drive <> "na") && ($longest_drive > $longest_drive1)) {				

				$longest_drive1=$longest_drive;

				} //endif

				

				

				} while ($stat5row=mysql_fetch_array($stat5query));

				

//Scrambling stats: Missed GIR

$total_drive=0;

$total_drive_distance=0;

$total_eagles=0;

$total_double_eagles=0;

$total_holeinone=0;

$total_birdies=0;

$total_par=0;



$hole=0;



include("mainstats.inc.php");			



include("substats.inc.php");			







//first deletes from ranking old ranks



 $statsdelsql="DELETE FROM ranking where userid='$login_id'";

 		$statsdelresult=mysql_query($statsdelsql);

	

 $statsaddsql = "INSERT INTO ranking (userid, ddistance, daccuracy, dlongest, girpct, puttavg, puttround, 

 totaleagles, totaldoubleeagles, totalholeinone, birdieavg, paravg, avgscore, parbreakers, par3birdies, par4birdies, par5birdies, par3pars, 

 par4pars, par5pars, par3perf, par4perf, par5perf, scrambling, net_totaleagles, net_totaldoubleeagles, net_totalholeinone, net_birdieavg, net_paravg, 

 net_avgscore, net_parbreakers, net_par3birdies, net_par4birdies, net_par5birdies, net_par3pars, net_par4pars, 

 net_par5pars, net_par3perf, net_par4perf, net_par5perf, net_scrambling)

  VALUES 

 ('$login_id', '$driving_distance', '$pct_fairways_hit', '$longest_drive1', '$pct_gir', '$avg_putt', '$putts_per_round', 

 '$total_eagles', '$total_double_eagles', '$total_holeinone',  '$avg_birdie', '$avg_par', '$avg_gross', '$pct_parbreak', '$par3_birdie_pct', '$par4_birdie_pct', 

 '$par5_birdie_pct', '$par3_par_pct', '$par4_par_pct', '$par5_par_pct', '$par3_avg_score', '$par4_avg_score', 

 '$par5_avg_score', '$scrambling_pct',

 '$net_total_eagles', '$net_total_double_eagles', '$net_total_holeinone', '$net_avg_birdie', '$net_avg_par', '$avg_net', '$net_pct_parbreak', '$net_par3_birdie_pct', 

 '$net_par4_birdie_pct', '$net_par5_birdie_pct', '$net_par3_par_pct', '$net_par4_par_pct', '$net_par5_par_pct', 

 '$net_par3_avg_score', '$net_par4_avg_score', 

 '$net_par5_avg_score', '$net_scrambling_pct')";



			$statsaddresult=mysql_query($statsaddsql);

			





//delete from substats

 $substatsdelsql="DELETE FROM substats where userid='$login_id'";

 		$substatsdelresult=mysql_query($substatsdelsql);



//do the substats

$substatsaddsql="INSERT INTO substats (userid, total_drive_distance, total_drive, total_fairways_hit, poss_fairways, 

total_gir, total_holes, total_putts2, total_holes_putt, total_birdies, total_rounds, total_par, total_gross, 

total_parbreak, total_putts1, total_putt_rounds, net_total_birdies, net_total_par, total_net, net_total_parbreak, 

par3_birdies, par4_birdies, par5_birdies, par3_pars, par4_pars, par5_pars, total_par3, total_par4, total_par5, 

total_par3_scores, total_par4_scores, total_par5_scores, scrambled_holes, missed_gir, net_par3_birdies, 

net_par4_birdies, net_par5_birdies, net_par3_pars, net_par4_pars, net_par5_pars, net_par3_scores, net_par4_scores, 

net_par5_scores, net_scrambled_holes) 

VALUES 

('$login_id', '$total_drive_distance', '$total_drive', '$total_fairways_hit', '$poss_fairways', '$total_gir', 

'$total_holes', '$total_putts2', '$total_holes_putt', '$total_birdies', '$total_rounds', '$total_par', '$total_gross', 

'$total_parbreak', '$total_putts1', '$total_putt_rounds', '$net_total_birdies', '$net_total_par', '$total_net', '$net_total_parbreak', 

'$par3_birdies','$par4_birdies', '$par5_birdies', '$par3_pars', '$par4_pars', '$par5_pars', '$total_par3', '$total_par4', '$total_par5',

 '$total_par3_scores', '$total_par4_scores', '$total_par5_scores', '$scrambled_holes', '$missed_gir', '$net_par3_birdies', 

 '$net_par4_birdies', '$net_par5_birdies', '$net_par3_pars', '$net_par4_pars', '$net_par5_pars', '$net_par3_scores', '$net_par4_scores',

  '$net_par5_scores', '$net_scrambled_holes')";



		$substatsaddresult=mysql_query($substatsaddsql);







}





	

} else {



echo "No courses found.<p>";



?>





</table>



	 

<?

} 



?>

<? showfooter(); ?>

Return current item: GolfstatsPHP