errors with undefined variable

I posted before joining and am still waiting for moderator approval but I’ve gotten things to kind of work since then. So now I’m posting these errors and hoping to get some help to get this working. I did not write the code and know very little about writing php (or any language for that matter including english).

error on web page
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘’ at line 1

error in logs

[Mon Feb 11 16:32:07 2013] [error] [client 66.205.141.237] PHP Notice: Undefined variable: TournName in /var/www/html/wrestling_dev/test/RosterBulk.php on line 27
[Mon Feb 11 16:32:07 2013] [error] [client 66.205.141.237] PHP Notice: Undefined variable: TournID in /var/www/html/wrestling_dev/test/RosterBulk.php on line 223
[Mon Feb 11 16:32:07 2013] [error] [client 66.205.141.237] PHP Notice: Undefined variable: ListSortBy in /var/www/html/wrestling_dev/test/RosterBulk.php on line 223

[php]<?
// Get config data OR throw error text
if (file_exists("…/inc/config.php")) {
include("…/inc/config.php");
} else {
$SiteName = “[Err: Config.php not found]”;
$SiteFooter = “© “.date(“Y”).””;
}

// Get school info
$queryString = “SELECT * FROM Schools WHERE (ID=”.$_SESSION[‘MySchool’].") AND ";
$queryString.= “(IsActive=‘Y’) LIMIT 1;”;
$tournList = mysql_query($queryString, $_SESSION[‘MySqlConn’]) or die(mysql_error());
$row_schoolInfo = mysql_fetch_assoc($tournList);
$row_cnt = mysql_num_rows($tournList);
if ($row_cnt == 1) {
$SchoolName = $row_schoolInfo[‘SchoolName’];
$SchoolLocation = $row_schoolInfo[‘SchoolLocation’];
if ($row_schoolInfo[‘Coach1Name’] <> ‘’) {
$Coach1Info = $row_schoolInfo[‘Coach1Name’].’’;
if ($row_schoolInfo[‘Coach1Phone’]<>’’) {
$Coach1Info.= ’ {’.$row_schoolInfo[‘Coach1Phone’].’}’;
}
if ($row_schoolInfo[‘Coach1Email’]<>’’) {
$Coach1Info.= ’ [<a href=“mailto:’.$row_schoolInfo[‘Coach1Email’];
$Coach1Info.= ‘?Subject=’.$TournName.’” class=“gentxtSml”’;
$Coach1Info.= ‘title=“Click to email ‘.$row_schoolInfo[‘Coach1Name’].’”>’;
$Coach1Info.= $row_schoolInfo[‘Coach1Email’].’]
’;
}
} else { $Coach1Info = ‘’; }
if ($row_schoolInfo[‘Coach2Name’] <> ‘’) {
$Coach2Info = $row_schoolInfo[‘Coach2Name’].’’;
if ($row_schoolInfo[‘Coach2Phone’]<>’’) {
$Coach2Info.= ’ {’.$row_schoolInfo[‘Coach2Phone’].’}’;
}
if ($row_schoolInfo[‘Coach2Email’]<>’’) {
$Coach2Info.= ’ [<a href=“mailto:’.$row_schoolInfo[‘Coach2Email’];
$Coach2Info.= ‘?Subject=’.$TournName.’” class=“gentxtSml”’;
$Coach2Info.= ‘title=“Click to email ‘.$row_schoolInfo[‘Coach2Name’].’”>’;
$Coach2Info.= $row_schoolInfo[‘Coach2Email’].’]
’;
}
} else { $Coach2Info = ‘’; }
// If Coach “2” is currently primary, switch to coach “1”
if ($row_schoolInfo[‘UseCoach’] == 2) {
$tmp = $Coach1Info;
$Coach1Info = $Coach2Info;
$Coach2Info = $tmp;
}
} else {
$SchoolName = ‘Unknown School’;
$SchoolLocation = ‘Unknown Location’;
$Coach1Info = ‘’;
$Coach2Info = ‘’;
}

function ShowCell($stringText) {

if (strlen($stringText) > 0) {
	return $stringText;
} else {
	return "&nbsp;";
}

}

$WrestlerFName = “”;
$WrestlerLName = “”;
$WrestlerWtClass = “”; // from $WtClass (TournConfig.php file) list
$WrestlerRank = “”; // A, B, C
$WrestlerSchool = “”; // If not logged in school
$Notes = “”;
$IsActive = “”;
$AddFormValidation = “”;
$AddFormCompletedOK = “”;

if ( (isset($_POST[‘FormSubmit’])) and ($_POST[‘FormSubmit’]==‘AddWrestlerBulk’) ) {
// Add school here (will be auto added to list of schools - must login)
$target_path = ‘tmpFiles/’;

if ($_FILES["CsvFileImport"]["error"] > 0) {
	echo "Error: " . $_FILES["CsvFileImport"]["error"] . "<br>";
} else {

	$target_path = $target_path . basename( $_FILES['CsvFileImport']['name']); 


$csv = array();
$csvSkip = array();

$num = 0;

	$name = $_FILES['CsvFileImport']['name'];
	$ext = strtolower(end(explode('.', $_FILES['CsvFileImport']['name'])));
	$type = $_FILES['CsvFileImport']['type'];
	$tmpName = $_FILES['CsvFileImport']['tmp_name'];

	// check the file is a csv
	if($ext === 'csv'){
		if(($handle = fopen($tmpName, 'r')) !== FALSE) {
			// necessary if a large csv file
			set_time_limit(0);

			$row = 0; $rowSkip = 0;
			while(($data = fgetcsv($handle, 0, ',')) !== FALSE) {
				// number of fields in the csv
				$num = count($data);

				$WrLastName = trim($data[0], " ");
				$WrFirstName = trim($data[1], " ");
				$WgtClass = trim($data[2], " ");
				$Rank = strtoupper(trim($data[3], " "));
				$WrSchoolName = trim($data[4], " ");
				$Notes = trim($data[5], " ");
				$IsActive = strtoupper(trim($data[6], " "));

				// Data defaults modifications
				if (($Rank == "") or ($Rank == NULL)) {
					$Rank = "A";
				}
				if (($IsActive <> "Y") and ($IsActive <> " N")) {
					$IsActive = "N";
				}


				// Validate data
				$error = "";
				if (($WrLastName == "") or ($WrLastName == NULL)) {
					if (strlen($error) > 0) { $error = $error . ", "; }
					$error = $error . "Invalid Last Name";
				}
				if (($WrFirstName == "") or ($WrFirstName == NULL)) {
					if (strlen($error) > 0) { $error = $error . ", "; }
					$error = $error . "Invalid First Name";
				}
				if (($WgtClass == "") or ($WgtClass == NULL)) {
					if (strlen($error) > 0) { $error = $error . ", "; }
					$error = $error . "Invalid Weight Class";
				}
				if ((strtolower($Rank) <>"rank") and (strlen($Rank) <> 1)) {
					if (strlen($error) > 0) { $error = $error . ", "; }
					$error = $error . "Invalid Rank [A-Z]";
				}


				if (
					(strtolower($WrLastName) == "wrestler last name") or
					(strtolower($WrFirstName) == "wrestler first name") or
					(strtolower($WgtClass) == "weight class") or
					(strtolower($Rank) == "rank") or
					(strtolower($WrSchoolName) == "school name") or
					(strtolower($Notes) == "notes") 
					) {
					// Skipped because it's the header
				} elseif (strlen($error) > 0) {
					$AddFormCompletedOK.= '<font color=RED>Record (<b>';
					$AddFormCompletedOK.= stripslashes(trim($WrFirstName.' '.$WrLastName));
					$AddFormCompletedOK.= '</b>) has been skipped for the following problems: <i>'.$error.'</i>.</font><br />';					
				} else {
					// Write to database
					$query_entry = "INSERT INTO `Wrestlers` (";
					$query_entry.= "`TournID`, `SchoolID`, `WrestlerLName`, `WrestlerFName`, `WrestlerWtClass`, `WrestlerRank`, `WrestlerSchool`, `Notes`, `IsActive`, `AddDate`";
					$query_entry.= ") VALUES (";
					$query_entry.= $TournID.", ".$_SESSION['MySchool'].", '".addslashes($WrLastName)."', '".addslashes($WrFirstName)."', '".addslashes($WgtClass)."', '".addslashes($Rank)."', '".addslashes($WrSchoolName)."', '".addslashes($Notes)."', '".addslashes($IsActive)."', '".date("Y-m-d H:i:s")."'";
					$query_entry.= ");"; 			
					$errtxt = "";
					$writeme = mysql_query($query_entry, $_SESSION['MySqlConn']) or $errtxt=mysql_error();
					if ($errtxt=="") { 
						$AddFormCompletedOK.= 'Your wrestler (<i>';
						$AddFormCompletedOK.= stripslashes(trim($WrFirstName.' '.$WrLastName));
						$AddFormCompletedOK.= '</i>) has been successfully added';
						if ($IsActive == "N") { $AddFormCompletedOK.= " but <b>is inactive</b>"; }
						$AddFormCompletedOK.= '.<br />';					
					} else {
						$AddFormCompletedOK = '<b>Error:</b> This form currently cannot be processed. Please contact the tournament organizer or try again later.';
						$AddFormCompletedOK.= '<br />{Error: '.$errtxt.'}<br />';
					}
					$row++;
				}
			}
			fclose($handle);
		}
	}
}

}

echo ‘’;
// Display school info (show “edit” link)
echo ‘

’;
// School name
echo ‘’;
echo ‘’;
echo ‘’;
// Primary Coach info

if (($Coach1Info <> ‘’) or ($Coach2Info <> ‘’)) {
echo ‘

’;
echo ‘
’;
echo ‘’;
echo ‘
’;
echo ‘’.$SchoolName.’’;
if ($SchoolLocation <> ‘’) { echo ’ :: ‘.$SchoolLocation; }
echo ‘
’;
echo ’   [Edit]’;
echo ’ [Logout]’;
echo ‘
’;
echo ‘
Coach’;
if (($Coach1Info <> ‘’) and ($Coach2Info <> ‘’)) { echo ‘es’; }
echo ':&nbsp;</td>';
echo '<td nowrap="nowrap">'.$Coach1Info.$Coach2Info.'</td>';
echo '</tr>';

}
echo ‘


’;

$queryString = “SELECT * FROM Wrestlers WHERE “;
$queryString.= “(SchoolID=’”.$_SESSION[‘MySchool’].”’) AND “;
$queryString.= “(TournID=’”.$TournID.”’) ORDER BY “.$ListSortBy.”;”;
$wrestList = mysql_query($queryString, $_SESSION[‘MySqlConn’]) or die(mysql_error());
$row_wrestList = mysql_fetch_assoc($wrestList);

if ($AddFormCompletedOK <> “”) {
echo ‘

’;
echo ‘
’;
echo ‘
’;
echo ‘’.$AddFormCompletedOK.’
[Click to refresh totals (site left column)]’;
echo ‘
’;
echo ‘

’;
} elseif ($AddFormValidation <> “”) {
echo ‘’;
echo ‘
’;
echo ‘
’;
echo ‘Your wrestler was not added! You must fix the following:
    ’.$AddFormValidation.’
’;
echo ‘
’;
echo ‘

’;
}

// Welcome message
echo ‘Welcome coach!
’;

/*
echo ‘’;
if (mysql_num_rows($wrestList) > 0) {
echo ‘Note: You currently have ‘;
echo mysql_num_rows($wrestList);
echo ’ wrestler’;
if (mysql_num_rows($wrestList) <> 1) { echo ‘s’; }
echo ’ currently on your roster.
’;
}
echo ‘
’;
*/

echo ‘’;
echo ‘You may upload your roster by using the blank template provided.

’;
echo ‘The chart below shows the currently registered wrestlers for your school.
’;
if (mysql_num_rows($wrestList) > 0) {
echo ‘To edit a wrestler, click the edit icon (Edit icon) next to their last name.
’;
}
echo ‘
’;

// Display list of wrestlers assoc to school
echo ‘

’;
echo ‘’;
echo ‘’;
echo ‘’;
echo ‘’;
echo ‘’;
echo ‘’;
echo ‘’;

if (mysql_num_rows($wrestList) > 0) {
$row_clr = “FFFFFF”;
do {
echo ‘

’;
if ($row_clr == “FFFFCC”) { $row_clr = “FFFFFF”;
} else { $row_clr = “FFFFCC”; }
echo ‘’;
echo ‘’;
echo ‘’;
echo ‘’;
echo ‘’;
echo ‘’;
} while($row_wrestList = mysql_fetch_assoc($wrestList));

} else {
// no wrestlers
echo ‘

’;
echo ‘’;
}
echo ‘
’;
echo ‘’;
echo ‘Last Name’;
echo ‘
’;
if ($ListSortCol == “LName”) {
echo ‘’;
}
echo ‘
’;
echo ‘’;
echo ‘First Name’;
echo ‘
’;
if ($ListSortCol == “FName”) {
echo '’;
}
echo ‘
’;
echo ‘’;
echo ‘Wt. Class’;
echo ‘
’;
if ($ListSortCol == “WtClass”) {
echo ‘’;
}
echo ‘
’;
echo ‘’;
echo ‘School’;
echo ‘
’;
if ($ListSortCol == “School”) {
echo '’;
}
echo ‘
’;
echo ‘’;
echo ‘Active’;
echo ‘
’;
if ($ListSortCol == “Active”) {
echo ‘*’;
}
echo ‘
’;
echo ‘’;
echo ‘Edit '.$row_wrestList['WrestlerFName'].' '.$row_wrestList['WrestlerLName'].'’;
echo ’
‘;
if ($row_wrestList[‘IsActive’] == “N”) { echo ‘’; }
echo ‘’.$row_wrestList[‘WrestlerLName’].’’;
if ($row_wrestList[‘IsActive’] == “N”) { echo ‘
’; }
echo ‘
’;
if ($row_wrestList[‘IsActive’] == “N”) { echo ‘’; }
echo ‘’.$row_wrestList[‘WrestlerFName’].’’;
if ($row_wrestList[‘IsActive’] == “N”) { echo ‘
’; }
echo ‘
’;
echo ‘’.$row_wrestList[‘WrestlerWtClass’].’ ‘.$row_wrestList[‘WrestlerRank’].’’;
echo ‘
’;
if ($row_wrestList[‘WrestlerSchool’] == “”) { echo ’ ‘; }
echo ‘’.$row_wrestList[‘WrestlerSchool’].’’;
echo ‘
<span title="’;
if ($row_wrestList[‘IsActive’] == “N”) { echo ‘Not Active’; } else { echo ‘Active’; }
echo ‘">’;
echo $row_wrestList[‘IsActive’];
echo ‘
’;
echo ‘There are currently no wrestlers.’;
echo ‘
’;

echo ‘


’;
// Add new wrestler form
echo ‘’;
echo ‘’; // Set max file size (in bytes)
echo ‘’;

echo ‘

’;

echo ‘

’;

echo ‘

’;
// CSV file to process
echo '';
// [Submit]

echo ’

';
// Extra info
echo ‘’;
// Single entry
echo ‘’;
// //
echo ‘
’;
if ($AddFormValidation <> “”) {
echo ‘’;
echo ‘
’;
echo ‘Your wrestlers were not added! You must fix the following:
    ’.$AddFormValidation.’
’;
echo ‘
’;
} elseif ($row_cnt > 0) {
echo ‘Note: Please check the list above for your wrestler before you use this form.
If you upload a wrestler record multiple times, you will get duplicate records.’;
}
echo ‘
Import Wrestlers
’;
echo ‘
* = Required
’;
echo ‘
CSV file*:   
  
’;
echo ‘TID: ‘.$TournID.’’;
echo ’ - ';
echo ‘SID: ‘.$_SESSION[‘MySchool’].’’;
echo ‘
’;
echo ‘[Enter wrestlers manually]’;
echo ‘
’;

echo ‘’;
echo ‘’;

echo ‘’;

?>[/php]

It seems like these variables are supposed to be in your config.php file?

I think the problem lies in the link itself to get the RosterBulk.php page to open in the Coach.php page were all the variables are seam to work.

[php]<?

// Get school info
$queryString = “SELECT * FROM Schools WHERE (ID=”.$_SESSION[‘MySchool’].") AND ";
$queryString.= “(IsActive=‘Y’) LIMIT 1;”;
$tournList = mysql_query($queryString, $_SESSION[‘MySqlConn’]) or die(mysql_error());
$row_schoolInfo = mysql_fetch_assoc($tournList);
$row_cnt = mysql_num_rows($tournList);
if ($row_cnt == 1) {
$SchoolName = $row_schoolInfo[‘SchoolName’];
$SchoolLocation = $row_schoolInfo[‘SchoolLocation’];
if ($row_schoolInfo[‘Coach1Name’] <> ‘’) {
$Coach1Info = $row_schoolInfo[‘Coach1Name’].’’;
if ($row_schoolInfo[‘Coach1Phone’]<>’’) {
$Coach1Info.= ’ {’.$row_schoolInfo[‘Coach1Phone’].’}’;
}
if ($row_schoolInfo[‘Coach1Email’]<>’’) {
$Coach1Info.= ’ [<a href=“mailto:’.$row_schoolInfo[‘Coach1Email’];
$Coach1Info.= ‘?Subject=’.$TournName.’” class=“gentxtSml”’;
$Coach1Info.= ‘title=“Click to email ‘.$row_schoolInfo[‘Coach1Name’].’”>’;
$Coach1Info.= $row_schoolInfo[‘Coach1Email’].’]
’;
}
} else { $Coach1Info = ‘’; }
if ($row_schoolInfo[‘Coach2Name’] <> ‘’) {
$Coach2Info = $row_schoolInfo[‘Coach2Name’].’’;
if ($row_schoolInfo[‘Coach2Phone’]<>’’) {
$Coach2Info.= ’ {’.$row_schoolInfo[‘Coach2Phone’].’}’;
}
if ($row_schoolInfo[‘Coach2Email’]<>’’) {
$Coach2Info.= ’ [<a href=“mailto:’.$row_schoolInfo[‘Coach2Email’];
$Coach2Info.= ‘?Subject=’.$TournName.’” class=“gentxtSml”’;
$Coach2Info.= ‘title=“Click to email ‘.$row_schoolInfo[‘Coach2Name’].’”>’;
$Coach2Info.= $row_schoolInfo[‘Coach2Email’].’]
’;
}
} else { $Coach2Info = ‘’; }
// If Coach “2” is currently primary, switch to coach “1”
if ($row_schoolInfo[‘UseCoach’] == 2) {
$tmp = $Coach1Info;
$Coach1Info = $Coach2Info;
$Coach2Info = $tmp;
}
} else {
$SchoolName = ‘Unknown School’;
$SchoolLocation = ‘Unknown Location’;
$Coach1Info = ‘’;
$Coach2Info = ‘’;
}

$WrestlerFName = “”;
$WrestlerLName = “”;
$WrestlerWtClass = “”; // from $WtClass (TournConfig.php file) list
$WrestlerRank = “”; // A, B, C
$WrestlerSchool = “”; // If not logged in school
$Notes = “”;
$IsActive = “”;
$AddFormValidation = “”;

if ( (isset($_POST[‘FormSubmit’])) and ($_POST[‘FormSubmit’]==‘AddWrestler’) ) {
// Add school here (will be auto added to list of schools - must login)
$WrestlerFName = $_POST[‘WrestlerFName’];
$WrestlerLName = $_POST[‘WrestlerLName’];
$WrestlerWtClass = $_POST[‘WrestlerWtClass’];
$WrestlerRank = $_POST[‘WrestlerRank’];
$WrestlerSchool = $_POST[‘WrestlerSchool’];
$Notes = $_POST[‘Notes’];
$IsActive = $_POST[‘IsActive’];

// Validation
if ($WrestlerFName=="") { 
	$AddFormValidation.= "<li>You must enter the Wrestler's <b>First Name</b>.</li>"; }
if ($WrestlerLName=="") { 
	$AddFormValidation.= "<li>You must enter the Wrestler's <b>Last Name</b>.</li>"; }
if (intval($WrestlerWtClass) < 10) { 
	$AddFormValidation.= "<li>You must select the Wrestler's <b>Weight Class</b>.</li>"; }

if ($AddFormValidation == "") {
	// Insert school
	$query_entry = "INSERT INTO `Wrestlers` (";
	$query_entry.= "`TournID`, `SchoolID`, `WrestlerLName`, `WrestlerFName`, `WrestlerWtClass`, `WrestlerRank`, `WrestlerSchool`, `Notes`, `IsActive`, `AddDate`";
	$query_entry.= ") VALUES (";
	$query_entry.= $TournID.", ".$_SESSION['MySchool'].", '".addslashes($WrestlerLName)."', '".addslashes($WrestlerFName)."', '".addslashes($WrestlerWtClass)."', '".addslashes($WrestlerRank)."', '".addslashes($WrestlerSchool)."', '".addslashes($Notes)."', '".addslashes($IsActive)."', '".date("Y-m-d H:i:s")."'";
	$query_entry.= ");"; 			
	$writeme = mysql_query($query_entry, $_SESSION['MySqlConn']) or $errtxt=mysql_error();
	if ($errtxt=="") { 
		$AddFormCompletedOK = 'Your wrestler (<i>';
		$AddFormCompletedOK.= stripslashes(trim($WrestlerFName.' '.$WrestlerLName));
		$AddFormCompletedOK.= '</i>) has been successfully added';
		if ($IsActive == "N") { $AddFormCompletedOK.= " but <b>is inactive</b>"; }
		$AddFormCompletedOK.= '.<br />';					

		// Clear fields
		$WrestlerFName = "";
		$WrestlerLName = "";
		$WrestlerWtClass = "";
		$WrestlerRank = "";
		$WrestlerSchool = "";
		$Notes = "";
		$IsActive = "";
	} else {
		$AddFormCompletedOK = '<b>Error:</b> This form currently cannot be processed. Please contact the tournament organizer or try again later.';
		$AddFormCompletedOK.= '<br />'.$errtxt;
	}
}

}

echo ‘’;
/*
echo ‘’;
echo ‘’;
echo $TournName;
echo ‘

’;
*/
// Display school info (show “edit” link)
echo ‘

’;
// School name
echo ‘’;
echo ‘’;
echo ‘’;
// Primary Coach info

if (($Coach1Info <> ‘’) or ($Coach2Info <> ‘’)) {
echo ‘

’;
echo ‘
’;
echo ‘’;
echo ‘
’;
echo ‘’.$SchoolName.’’;
if ($SchoolLocation <> ‘’) { echo ’ :: ‘.$SchoolLocation; }
echo ‘
’;
echo ’   [Edit]’;
echo ’ [Logout]’;
echo ‘
’;
echo ‘
Coach’;
if (($Coach1Info <> ‘’) and ($Coach2Info <> ‘’)) { echo ‘es’; }
echo ':&nbsp;</td>';
echo '<td nowrap="nowrap">'.$Coach1Info.$Coach2Info.'</td>';
echo '</tr>';

}
echo ‘


’;

$queryString = “SELECT * FROM Wrestlers WHERE “;
$queryString.= “(SchoolID=’”.$_SESSION[‘MySchool’].”’) AND “;
$queryString.= “(TournID=’”.$TournID.”’) ORDER BY “.$ListSortBy.”;”;
$wrestList = mysql_query($queryString, $_SESSION[‘MySqlConn’]) or die(mysql_error());
$row_wrestList = mysql_fetch_assoc($wrestList);

if ($AddFormCompletedOK <> “”) {
echo ‘

’;
echo ‘
’;
echo ‘
’;
echo ‘’.$AddFormCompletedOK.’’;
echo ‘
’;
echo ‘

’;
} elseif ($AddFormValidation <> “”) {
echo ‘’;
echo ‘
’;
echo ‘
’;
echo ‘Your wrestler was not added! You must fix the following:
    ’.$AddFormValidation.’
’;
echo ‘
’;
echo ‘

’;
}

// Welcome message
echo ‘Welcome coach!
’;

echo ‘’;
echo ‘The chart below shows the currently registered wrestlers for your school.
’;
if (mysql_num_rows($wrestList) > 0) {
echo ‘To edit a wrestler, click the edit icon (Edit icon) next to their last name.
’;
}
echo ‘
’;

// Display list of wrestlers assoc to school
echo ‘

’;
echo ‘’;
echo ‘’;
echo ‘’;
echo ‘’;
echo ‘’;
echo ‘’;
echo ‘’;

if (mysql_num_rows($wrestList) > 0) {
$row_clr = “FFFFFF”;
do {
echo ‘

’;
if ($row_clr == “FFFFCC”) { $row_clr = “FFFFFF”;
} else { $row_clr = “FFFFCC”; }
echo ‘’;
echo ‘’;
echo ‘’;
echo ‘’;
echo ‘’;
echo ‘’;
} while($row_wrestList = mysql_fetch_assoc($wrestList));

} else {
// no wrestlers
echo ‘

’;
echo ‘’;
}
echo ‘
’;
echo ‘’;
echo ‘Last Name’;
echo ‘
’;
if ($ListSortCol == “LName”) {
echo ‘’;
}
echo ‘
’;
echo ‘’;
echo ‘First Name’;
echo ‘
’;
if ($ListSortCol == “FName”) {
echo '’;
}
echo ‘
’;
echo ‘’;
echo ‘Wt. Class’;
echo ‘
’;
if ($ListSortCol == “WtClass”) {
echo ‘’;
}
echo ‘
’;
echo ‘’;
echo ‘School’;
echo ‘
’;
if ($ListSortCol == “School”) {
echo '’;
}
echo ‘
’;
echo ‘’;
echo ‘Active’;
echo ‘
’;
if ($ListSortCol == “Active”) {
echo ‘*’;
}
echo ‘
’;
echo ‘’;
echo ‘Edit '.$row_wrestList['WrestlerFName'].' '.$row_wrestList['WrestlerLName'].'’;
echo ’
‘;
if ($row_wrestList[‘IsActive’] == “N”) { echo ‘’; }
echo ‘’.$row_wrestList[‘WrestlerLName’].’’;
if ($row_wrestList[‘IsActive’] == “N”) { echo ‘
’; }
echo ‘
’;
if ($row_wrestList[‘IsActive’] == “N”) { echo ‘’; }
echo ‘’.$row_wrestList[‘WrestlerFName’].’’;
if ($row_wrestList[‘IsActive’] == “N”) { echo ‘
’; }
echo ‘
’;
echo ‘’.$row_wrestList[‘WrestlerWtClass’].’ ‘.$row_wrestList[‘WrestlerRank’].’’;
echo ‘
’;
if ($row_wrestList[‘WrestlerSchool’] == “”) { echo ’ ‘; }
echo ‘’.$row_wrestList[‘WrestlerSchool’].’’;
echo ‘
<span title="’;
if ($row_wrestList[‘IsActive’] == “N”) { echo ‘Not Active’; } else { echo ‘Active’; }
echo ‘">’;
echo $row_wrestList[‘IsActive’];
echo ‘
’;
echo ‘There are currently no wrestlers.’;
echo ‘
’;

echo ‘


’;
// Add new wrestler form
echo ‘’;
echo ‘’;

echo ‘

’;

echo ‘

’;

echo ‘

’;
// wrestler name
echo ‘’;
// Wt Class // Rank
// // // // // // // Edit the $WtList variable (withinin the TournConfig.php file)
// // // // // // // to edit the classes for the tournament
echo ‘’;
// IsActive
echo ‘’;
// WrestlerSchool

echo ‘

’;
// Notes
echo '';
// [Submit]
echo ’';
// Extra info
echo ‘’;
// Bulk upload link
echo ‘’;
// //
echo ‘
’;
if ($AddFormValidation <> “”) {
echo ‘
’;
echo ‘Your wrestler was not added! You must fix the following:
    ’.$AddFormValidation.’
’;
echo ‘
’;
} elseif ($row_cnt > 0) {
echo ‘Note: Please check the list above for your wrestler before you use this form.’;
}
echo ‘
Add Wrestler
’;
echo ‘
* = Required
’;
echo ‘
Wrestler Name*:    [first][last]
Weight Class*:  ‘;
echo ‘’;
echo ‘- Select -’;
$WtClassList = explode(",", $WtList);
if (count($WtClassList) > 0) {
for ($i=0;$i<count($WtClassList);$i++) {
echo ‘<option value="’.$WtClassList[$i].’"’;
if (intval($WrestlerWtClass) == intval($WtClassList[$i])) { echo ’ selected=“selected”’; }
echo ‘>’.$WtClassList[$i].’’;
}
}
echo ’ ‘;
echo ‘’;
for ($i=65;$i<=90;$i++) {
echo ‘<option value="’.chr($i).’"’;
if ($WrestlerRank == chr($i)) { echo ’ selected=“selected”’; }
echo ‘>’.chr($i).’’;
}
echo ‘’;
echo ‘
Active?  ‘;
echo ‘’;
echo ‘<option value=“Y”’;
if ($IsActive == “Y”) { echo ’ selected=“selected”’; }
echo ‘>Yes’;
echo ‘<option value=“N”’;
if ($IsActive == “N”) { echo ’ selected=“selected”’; }
echo ‘>No’;
echo ‘’;
echo ‘
School: 
(Only if not enrolled at ‘.$SchoolName.’)
Notes: 
  
’;
echo ‘TID: ‘.$TournID.’’;
echo ’ - ';
echo ‘SID: ‘.$_SESSION[‘MySchool’].’’;
echo ‘
’;
echo ‘[Bulk upload multiple wrestlers]’;
//echo ‘[Bulk upload multiple wrestlers]’;
echo ‘
’;

echo ‘’;
echo ‘’;

?>

<? echo ''; ?>

[/php]

at the bottom is the link

echo '[<a href="?Pg=bulk" class="gentxtXSml" title="">Bulk upload multiple wrestlers</a>]';
echo '</center></td></tr>';

when the link is clicked it does nothing but change the the url to
http://bugs2go.com/wrestling_dev/test/Coach.php?Pg=bulk

So Im assumeing there somewere bulk is supposed to equel RosterBulk.php

What I’m saying is that these 3 variables are missing aka undefined. I have no idea what they should be or where they should be set but it appears to me it should be in your config.php include.

$TournName
$TournID
$ListSortBy

These are required for your query to work:

[php]"(TournID=’".$TournID."’) ORDER BY “.$ListSortBy.”;"[/php]

Now I’m just frustrated. I just want to know why it works on the coders server but not on mine. I restored everything to original and this is the only error that shows in the log

Tue Feb 12 13:09:09 2013] [error] [client 66.205.141.237] PHP Warning: date() [function.date]: It is not safe to rely on the system’s timezone settings. You are required to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected ‘America/Los_Angeles’ for ‘PST/-8.0/no DST’ instead in /var/www/html/wrestling_dev/inc/config.php on line 7, referer: http://bugs2go.com/wrestling_dev/test/Coach.php
[Tue Feb 12 13:09:09 2013] [error] [client 66.205.141.237] PHP Notice: Undefined variable: AddFormCompletedOK in /var/www/html/wrestling_dev/test/Roster.php on line 158, referer: http://bugs2go.com/wrestling_dev/test/Coach.php

The date error is new since upgrading to php 5.3 to see if it was a ver problem. Could winblows vs linux server have something to do with it?

For the date error, you need to modify the date.timezone setting in your php.ini

It could be simply different php.ini configurations. Perhaps those missing variables above are actually GET variables and his php.ini has register_globals = On

It’s really hard to say. You just have to debug one thing at a time.

I dont know how, I dont know why but it works now. Basically I recreated the folder and reran permissions on the Template folder and now it works.

Sponsor our Newsletter | Privacy Policy | Terms of Service