View Single Post
  #2   Spotlight this post!  
Unread 03-03-2003, 21:45
Jack's Avatar
Jack Jack is offline
FIRST Scouting Network
AKA: Andrew Schenk
FRC #0201 (The FEDS)
Team Role: Alumni
 
Join Date: Feb 2002
Rookie Year: 2002
Location: Rochester Hills
Posts: 643
Jack is a jewel in the roughJack is a jewel in the roughJack is a jewel in the rough
Send a message via AIM to Jack
It looks good. One suggestion though. Please... seperate the teams into different pages. Don't put them all on one big one.

Since you're allready using php, just add something like

if ( isset($HTTP_GET_VARS['tn']) || isset($HTTP_POST_VARS['tn']) )
{
$team_number = (int) ( isset(HTTP_POST_VARS['tn']) ? $HTTP_POST_VARS['tn'] : $HTTP_GET_VARS['tn'] );

if ( $team_number < 1 || $team_number > 9999 )
{
$team_number = -1;
}

} else {
$team_number = -1;
}

if ($team_number != -1)
{
$add_sql = "WHERE team_number = $team_number";
} else {
$add_sql = "";
}

Then... to your sql string that you get to fetch the data.. just go

$sql .= $add_sql

note... if you allredy have a WHERE to take that out of the $add_sql and to rename the team_number in the sql to whatever it's in your db. This should work with any version of php and if you use a new enough version you can just use the globals. Also... be sure you have magic quotes or else use addslashes($team_number) before the sql.

Also... once you finish this.. please pm or email me with a direct link to a team page so that I can add your db to the www.feds201.com
__________________
Team 201 - 2003 Great Lakes Semifinalists & 2003 Archimedes Division Finalists :|: Webmaster of www.feds201.com -> FBI Scouting
Winner of The 2003 ChiefDelphi Web Award for: User That Started The Most Non Chit Chat Threads
Winner of: 2003 FIRST Ventures with 5451.68 End Points

All about me: http://knehcsa.vze.com
**Check out the New FIRST Scouting Network**