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

include("dbasecon.inc.php");

include("session.inc.php");

include ("header.php");

include_once "sf.php";




if ($login_id <> "$guestid") {


$usersql= "Select * From users_tour

						where userid='$login_id'";

	 $userquery=mysql_query($usersql);

	 $userrow=mysql_fetch_array($userquery);	 			

	 $userexist=mysql_numrows($userquery);



	 extract($userrow);

	 

//get list of courses



$coursesql= "Select * From courses

						ORDER BY courseid ASC";

	 $coursequery=mysql_query($coursesql);

	 $courserow=mysql_fetch_array($coursequery);	 			

	 $courseexist=mysql_numrows($coursequery);









?>



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



<? showheader("Score Manager"); ?>

<form  method="post" action="scorecard.php">

<table border="1" cellpadding="5" cellspacing="5">

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

User Name:

</td>

<td>

<? echo "$name $surname"; ?>

</td>

</tr>

<tr class=bg4>

<td class=menu-bg>

                       Date:

</td>

<td>                          

						  <select name="day">

	<? 

		$listdayz = listdigits("31", "1");

		echo "$listdayz";

	?>	

						  </select>



                          / 

						  <select name="month">

	<? 

		$listmonths = listdigits("12", "1");

		echo "$listmonths";

	?>	

						  </select>



                          / 

                          <select name="year">

	<? 

	$thisyear=date('Y');

		$listyears = listyears("10", "$thisyear");

		echo "$listyears";

	?>

                          </select>

</td>

</tr>

<tr class=bg4>

<td class=menu-bg>

Select Course:

</td>

<td>

<select name="courseid">



<?



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

do {

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

$courserow["courseid"],  $courserow["courseid"], $courserow["coursename"]);



 																																																			 

																																															

}while ($courserow=mysql_fetch_array($coursequery));

 //endwhile





?>

</select>

</td>

</tr>

<tr class=bg4>

<td class=menu-bg>

Handicap:

</td>

<td> 

<select name='handicap'>

	<? 

		$listdayz2 = listdigits2("38", $handicap);

		echo "$listdayz2";

	?>	



</select>



</td>

</tr>

<tr class=bg4>

<td class=menu-bg>

Tournament:

</td>

<td> 

<input type="checkbox" name="tournament" value="1">

</td>

</tr>

<p>

<tr>

<td colspan=2 class=menu-bg>

<input type="Hidden" name="username" value="<?echo "$name &nbsp;"; echo "$surname";?>">

<input type="Submit" name="scorecard" value="Next >>">

</td>

</table>



<p>

</form>


<?
} else {


showheader("Score Manager");
echo "Guest cannot add scorecards. Please <a href='signup.php'>register</a> for free!";

} //endif loginid<>guestid
?>





<? showfooter(); ?>

Return current item: GolfstatsPHP