Jump to content

jetpacmidge

Members
  • Posts

    6
  • Joined

  • Last visited

    Never

About jetpacmidge

  • Birthday 05/22/1970

Profile Information

  • Gender
    Male
  • Location
    Hampshire

jetpacmidge's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Hi, I am using PHP v5, Apache v1.3 and MYSQL v5. I am unable to delete divisions from the table after selecting the age group that relates to the division. [code]<?php   /* Program: DeleteDivision.php   * Desc:    A confirmation screen    *          is sent to the user.   */   /*  $age = $_POST['age'];  */   $interest = mysql_escape_string($_POST['age']); /* $age = $_POST['division'];  */     if (!empty($_POST['age']))        {        $interest = $_POST['age'];        }    ?> <html> <head><title>Delete Division</title></head> <BODY BGCOLOR="FAFAD2" TEXT="00008B" LINK="00008B" VLINK="00008B" ALINK="00008B"> <?php   include("connection.inc");   $connection = mysql_connect($host,$user,$password)       or die ("couldn't connect to server");   $db = mysql_select_db($database,$connection)       or die ("Couldn't select database"); /* echo  */           /*  $query = "DELETE FROM agegroup WHERE age='$division' ";  */   /*  $query = "DELETE FROM division WHERE age='$ageList' ";    */   /*  $query = "DELETE FROM division WHERE division='".$_POST['division']."' ";  */         $query = "DELETE FROM division WHERE division='".$_POST['division']."' AND age='".mysql_escape_string($_POST['age'])."' ";   $result = mysql_query($query) or die('Query failed: ' . mysql_error());   include("deletedivision_form.inc");   echo "<div align='center'> <a href='selectage.php'><font size=+1>Delete Another Division ?</a> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <a href='tadburnfc.htm'>Return To Main Page</a></font></div>"; ?> </body> </html>[/code] [code]<?php   /* Program: ShowDivisions.php   * Desc:    Displays all the divisions in the age group. Category is passed   *          in a variable from a form. The information for each division   *          is displayed on a single line.   */ ?> <html> <head><title>Show Divisions</title></head> <body topmargin="0" marginheight="0"> <?php   include("connection.inc");   $connection = mysql_connect($host,$user,$password)       or die ("couldn't connect to server");   $db = mysql_select_db($database,$connection)       or die ("Couldn't select database"); /* $interest = $_POST['interest'];  */     $interest = mysql_escape_string($_POST['age']);    /* Select division from age group selected */ echo  $query = "SELECT division FROM division WHERE season='2006/07' and age='$interest'";        // 25   $result = mysql_query($query)       or die ("Couldn't execute query."); ?> <div style='margin-left: .5in'> <p align="left">   <b><font face="Arial, Helvetica, sans-serif" size="+2" color="#0000FF">Divisions</font></b>   </p>   <font face="Arial, Helvetica, sans-serif" size="+1" color="#0000FF">   <p>&nbsp;   <p><b>Below is a list of divisions that are currently in the database.</b>   <p>Select as many divisions that you want to delete from age group selected:   </font> <?php   /* create form containing checkboxes */   echo "<form action='deletedivision2.php' method='post'>\n";    ?>   <table width="25%">   <tr>   <th align="left">Division</th>   <th align="left">Delete</th>   </tr>   <?php   while ($row = mysql_fetch_array($result))   {     extract($row);           echo "<tr>\n";     echo "<td>$division</td>\n";     echo "<td><input type='checkbox' name='division' value='$division'></td>\n";     echo "</tr>\n";     echo "<br>\n";   }     ?>     </table>     <?php     echo "<p><input type='submit' value='Delete Division'>         </form>\n"; ?> </body> </html>[/code] [code]<?php   /* Program: deletedivision_form.inc   * Desc:    Displays form to delete the division from the database   */ ?> <html> <head> <title>Confirmation form for Deletion of Division</title> </head> <BODY BGCOLOR="FAFAD2" TEXT="00008B" LINK="00008B" VLINK="00008B" ALINK="00008B"> <center>   <b><font face="Arial, Helvetica, sans-serif" size="+4" color="#0000FF">Confirmation</font></b> </center> <br> <br> <font face="Arial, Helvetica, sans-serif" size="+2" color="#0000FF"> <?php echo "The following division has been deleted from the Tadburn FC Database: \n" ?> <br> <br> <br> <br> <table border="0" width="75%"> <tr> <th align="center">Season</th> <th align="center">Age Group</th> <th align="center">Division</th> </tr> <tr> <td align="center"><?php echo $_POST['season'] ?></td> <td align="center"><?php echo $_POST['age'] ?></td> /*  <td align="center"><?php echo $_POST['division'] ?></td>  */ <td align="center"><?php echo name="division[]" ?></td>  </tr> </table> <br> <br> <br> </font> </body> </html>[/code] Thanks :)
  2. Hi, I am using PHP v5, MYSQL v5 and Apache v1.3. When I try and enter a query into the MYSQL command client line I am unable to enter data into the table :- SQL query :- [code]INSERT INTO fixturesresults (season,age,division,hometeam,awayteam) VALUES (SELECT home.season,home.age,home.division,home.team,away.team FROM team as home, team as away WHERE home.team !=away.team);[/code] TABLE NAME - team +----------+----------+------+-----+---------+-------+ | Field    | Type    | Null | Key | Default | Extra | +----------+----------+------+-----+---------+-------+ | season  | char(10) | NO  | PRI | NULL    |      | | age      | char(15) | NO  | PRI | NULL    |      | | division | char(20) | NO  | PRI | NULL    |      | | team    | char(30) | NO  | PRI | NULL    |      | +----------+----------+------+-----+---------+-------+ TABLE NAME - fixturesresults +-----------+-----------------+------+-----+------------+-------+ | Field    | Type            | Null | Key | Default    | Extra | +-----------+-----------------+------+-----+------------+-------+ | season    | char(10)        | NO  | PRI | NULL      |      | | age      | char(15)        | NO  | PRI | NULL      |      | | division  | char(20)        | NO  | PRI | NULL      |      | | hometeam  | char(30)        | NO  | PRI | NULL      |      | | awayteam  | char(30)        | NO  | PRI | NULL      |      | | homescore | int(3) unsigned | NO  |    | 0          |      | | awayscore | int(3) unsigned | NO  |    | 0          |      | | date      | date            | NO  |    | 0000-00-00 |      | +-----------+-----------------+------+-----+------------+-------+ ERROR MESSAGE :- [code]ERROR 1064 (42000): 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 'SELEC T home.season,home.age,home.division,home.team,away.team FROM team as home,' at line 1[/code] Thanks   :shock:
  3. Hi, I am using Apache Web Server v 1.3, PHP v 5.1.3 and MYSQL 5.0.21 and have installed PHPMyAdmin v 2.8.1. on Windows XP. When logging into PHPMyAdmin I get the following Error msg :- Error MySQL said:  #1045 - Access denied for user 'root'@'localhost' (using password: NO) Copy of config.inc.php script ... <?php $cfg['PmaAbsoluteUri'] = 'http://127.0.0.1/phpMyAdmin/'; $cfg['Servers'][$i]['host'] = 'localhost'; $cfg['Servers'][$i]['auth_type'] = 'config'; $cfg['Servers'][$i]['user'] = 'root'; $cfg['Servers'][$i]['controlpass'] = ''; $cfg['Servers'][$i]['password'] = 'gemini';  ?> If I include or exclude the user and password in the script I still get the same error msg. I know that the passwords are correct as I can access mysql using root and its password. Thanks.   ;D
  4. Hi, Sorry the code should have read :- <?php /* Program: AddResult.php * Desc: A confirmation screen * is sent to the user. */ $season = $_POST['season']; $newteam = $_POST['newteam']; $fixtureDate = $_POST['fixtureDate']; $age = $_POST['age']; $division = $_POST['division']; $homeTeam = $_POST['homeTeam']; $homeScore = $_POST['homeScore']; $awayTeam = $_POST['awayTeam']; $awayScore = $_POST['awayScore']; $matchtype = $_POST['matchtype']; $team = $_POST['team']; $played = $_POST['played']; $won = $_POST['won']; $lost = $_POST['lost']; $drawn = $_POST['drawn']; $goalsfor = $_POST['goalsfor']; $goalsagainst = $_POST['goalsagainst']; $points = $_POST['points']; if (@$_POST['newbutton'] == "Cancel") { header("Location: tadburnfc.htm"); } if ($newteam == "new") { if ($newhometeam == "") // if the text field is blank { include("NewResultform.inc"); exit(); } else { $newteam = $newhometeam; } } ?> <html> <head><title>Add Result</title></head> <?php include("connection.inc"); $connection = mysql_connect($host,$user,$password) or die ("couldn't connect to server"); $db = mysql_select_db($database,$connection) or die ("Couldn't select database"); $query = "INSERT INTO leagueTable (season,fixtureDate,age,division,homeTeam,homeScore,awayTeam,awayScore,matchtype,team,played,won,lost,drawn,goalsfor,goalsagainst,points) VALUES ('$season','$fixtureDate','$age','$division','$homeTeam','$homeScore','$awayTeam','$awayScore','$matchtype','','','','','','','','')"; $result = mysql_query($query) or die ("Couldn't execute query."); $teamID = mysql_insert_id(); echo "The following result has been added to the Tadburn FC database:<br> <ul> <li>Season: $season <li>Fixture Date: $fixtureDate <li>Age Group: $age <li>Home Team: $homeTeam <li>Home Score: $homeScore <li>Away Team: $awayTeam <li>Away Score: $awayScore <li>Match Type: $matchtype </ul> \n"; ?> <br> <br> <br> <br> <br> <br> <font face="Arial, Helvetica, sans-serif" size="+2" color="#0000FF"> <div align='center'> <a href='results2.php'>Add Another Result ?</a> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <a href='tadburnfc.htm'>Return To Main Page</a></div> </font> </body> </html> Thanks, Andy M.
  5. Hi, I am new to using PHP & MYSQL and have developed a website for entering football results on a website and the tables get automatically updated. Everytime I enter the result a message of couldn't execute query appears. Where have I gone wrong ?? Below is the code for the webpages :- [code][code]<?php   /* Program: AddResult.php    * Desc:    A confirmation screen      *          is sent to the user.    */   $season = $_POST['season'];   $newteam = $_POST['newteam'];   $fixtureDate = $_POST['fixtureDate'];   $age = $_POST['age'];   $division = $_POST['division'];   $homeTeam = $_POST['homeTeam'];   $homeScore = $_POST['homeScore'];   $awayTeam = $_POST['awayTeam'];   $awayScore = $_POST['awayScore'];   $matchtype = $_POST['matchtype'];   $team = $_POST['team'];   $played = $_POST['played'];   $won = $_POST['won'];   $lost = $_POST['lost'];   $drawn = $_POST['drawn'];   $goalsfor = $_POST['goalsfor'];   $goalsagainst = $_POST['goalsagainst'];   $points = $_POST['points']; if (@$_POST['newbutton'] == "Cancel")   {      header("Location: tadburnfc.htm");   }     if ($newteam == "new")     {     if ($newhometeam == "") // if the text field is blank       {        include("NewResultform.inc");        exit();     }         else         {            $newteam = $newhometeam;         }     }         ?> <html> <head><title>Add Result</title></head> <?php   include("connection.inc");   $connection = mysql_connect($host,$user,$password)        or die ("couldn't connect to server");   $db = mysql_select_db($database,$connection)        or die ("Couldn't select database");     $query = "INSERT INTO leagueTable (season,fixtureDate,age,division,homeTeam,homeScore,awayTeam,awayScore,matchtype,team,played,won,lost,drawn,goalsfor,goalsagainst,points)             VALUES ('$season','$fixtureDate','$age','$division','$homeTeam','$homeScore','$awayTeam','$awayScore','$matchtype','','','','','','','','')";   $result = mysql_query($query)        or die ("Couldn't execute query."); $teamID = mysql_insert_id(); echo "The following result has been added to the Tadburn FC database:<br>         <ul>          <li>Season: $season      <li>Fixture Date: $fixtureDate          <li>Age Group: $age          <li>Home Team: $homeTeam      <li>Home Score: $homeScore      <li>Away Team: $awayTeam      <li>Away Score: $awayScore          <li>Match Type: $matchtype </ul> \n"; ?> <br> <br> <br> <br> <br> <br> <font face="Arial, Helvetica, sans-serif" size="+2" color="#0000FF"> <div align='center'> <a href='results2.php'>Add Another Result ?</a> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <a href='tadburnfc.htm'>Return To Main Page</a></div> </font> </body> </html>[/code][/code] [code] [code]<?php   /* Program: results.php    * Desc:    Allows the user to enter football results.      *    There are drop down menus to choose the      *    Division, Age Group, & Football Team      */ ?> <?php   if (@$_POST['newbutton'] == "Enter Football Results" or @$_POST['newbutton'] == "Cancel")   {     header("Location: tadburnfc.htm");   } ?> <html> <head><title>Add Football Result</title></head> <body> <?php   include("connection.inc");   $connection = mysql_connect($host,$user,$password)        or die ("couldn't connect to server");   $db = mysql_select_db($database,$connection)        or die ("Couldn't select database");     /* create form */   echo "<div style='margin-left: .1in'>";   echo "<form action='AddFootballResult.php' method='post'>\n";     include("FootballResultInfo_table.inc");   echo "<input type='hidden' name='category' value='$category'>\n";   echo "<p><input type='submit' value='Submit Result'>         <input type='submit' name='newbutton' value='Cancel'>         </form>\n"; ?>[/code] TABLE Information create table leagueTable ( teamID INT(5) NOT NULL AUTO_INCREMENT, season CHAR(10) NOT NULL, fixtureDate VARCHAR(20) NOT NULL, age CHAR(15) NOT NULL, division VARCHAR (20) NOT NULL, homeTeam CHAR(30) NOT NULL, homeScore INT(3) UNSIGNED NOT NULL, awayTeam CHAR(30) NOT NULL, awayScore INT(3) UNSIGNED NOT NULL, matchtype VARCHAR(10), team CHAR(30) NOT NULL, played INT(4) UNSIGNED NOT NULL, won INT(4) UNSIGNED NOT NULL, lost INT(4) UNSIGNED NOT NULL, drawn INT(4) NOT NULL, goalsfor VARCHAR(4) NOT NULL, goalsagainst VARCHAR(4) NOT NULL, points INT(3) NOT NULL, PRIMARY KEY(teamID) ); Thanks for your help !! Rgds, Andy M. :D
  6. Hi I am new to using PHP and MYSQL. I am designing a website so that I can update football tables where the user can enter the results which automatically updates the tables. Please find attached a zipped file of what I have achieved so far. I am using Linux running apache webserver, PHP and MYSQL. These are the problems that I have with my interactive website :- 1. You can enter results by not filling in all the fields. This should not happen as all fields should be filled in NOT NULL in creating the tables for the database ? 2. How do I solve the problem of when the results have been entered the tables have been updated and show the correct standings for each team ? 3. How do I add points goal difference etc to the tables ? Below is a list of programs for my web site as I cannot send an attached as a zip file !! AddResult.php - Confirmation Screen when result has been entered on web site. <?php /* Program: AddResult.php * Desc: A confirmation screen * is sent to the user. */ $season = $_POST[\'season\']; $fixtureDate = $_POST[\'fixtureDate\']; $age = $_POST[\'age\']; $homeTeam = $_POST[\'homeTeam\']; $homeScore = $_POST[\'homeScore\']; $awayTeam = $_POST[\'awayTeam\']; $awayScore = $_POST[\'awayScore\']; if (@$_POST[\'newbutton\'] == \"Cancel\") { header(\"Location: tadburnfc.htm\"); } if ($homeTeam == \"new\") { if ($newhomeTeam == \"\") // if the text field is blank { include(\"NewResultform.inc\"); exit(); } else { $homeTeam = $newhomeTeam; } } ?> <html> <head><title>Add Result</title></head> <?php include(\"connection.inc\"); $connection = mysql_connect($host,$user,$password) or die (\"couldn\'t connect to server\"); $db = mysql_select_db($database,$connection) or die (\"Couldn\'t select database\"); $query = \"INSERT INTO results (season,fixtureDate,age,homeTeam,homeScore,awayTeam,awayScore) VALUES (\'$season\',\'$fixtureDate\',\'$age\',\'$homeTeam\',\'$homeScore\',\'$awayTeam\',\'$awayScore\')\"; $result = mysql_query($query) or die (\"Couldn\'t execute query.\"); include(\"Confirmation_form.inc\"); ?> </body> </html> Confirmation Form <?php /* Program: NewResultform.inc * Desc: Displays form to collect the result information */ ?> <BODY BGCOLOR=\"FAFAD2\" TEXT=\"00008B\" LINK=\"00008B\" VLINK=\"00008B\" ALINK=\"00008B\"> <center> <b><font face=\"Arial, Helvetica, sans-serif\" size=\"+4\" color=\"#0000FF\">Confirmation</font></b> </center> <br> <br> <font face=\"Arial, Helvetica, sans-serif\" size=\"+2\" color=\"#0000FF\"> <?php echo \"The following result has been added to Tadburn FC Database: n\" ?> <br> <br> <br> <?php echo\" Season: $season n\" ?> <br> <br> <table border=\"0\" width=\"75%\"> <tr> <th align=\"center\">Fixture Date</th> <th align=\"center\">Age</th> <th align=\"center\">Home Team</th> <th align=\"center\">Home Score</th> <th align=\"center\">Away Team</th> <th align=\"center\">Away Score</th> </tr> <tr> <td align=\"center\"><?php echo $fixtureDate ?> </td> <td align=\"center\"><?php echo $age ?></td> <td align=\"center\"><?php echo $homeTeam ?></td> <td align=\"center\"><?php echo $homeScore ?></td> <td align=\"center\"><?php echo $awayTeam ?></td> <td align=\"center\"><?php echo $awayScore ?></td> </tr> </table> <br> <br> <br> <?php echo \"Add Another Result ? <a href=\'results.php\'>YES</a>n\"?> <?php echo \"<a href=\'tadburnfc.htm\'>NO</a>n\"?> </font> Connection.inc file to connect to database. <?php $user=\"root\"; $host=\"localhost\"; $password=\"\"; $database=\"Tadburnfc\"; ?> CREATETABLES.BASH executable file to create tables for database. mysql -B <<EOF #use Tadburnfc; #show databases; #use Slotcars; #show tables; use Tadburnfc; drop table teams; drop table results; drop table leagueTable; create table teams ( season CHAR(7) NOT NULL, age CHAR(15) NOT NULL, team CHAR(30) NOT NULL, PRIMARY KEY(season, age, team) ); create table results ( season CHAR(7) NOT NULL, age CHAR(15) NOT NULL, homeTeam CHAR(30) NOT NULL, awayTeam CHAR(30) NOT NULL, fixtureDate DATE NOT NULL, homeScore INT(3) UNSIGNED NOT NULL, awayScore INT(3) UNSIGNED NOT NULL, PRIMARY KEY(season, age, homeTeam, awayTeam) ); create table leagueTable ( season CHAR(7) NOT NULL, age CHAR(15) NOT NULL, team CHAR(30) NOT NULL, played INT(2) UNSIGNED NOT NULL, homewins INT(2) UNSIGNED NOT NULL, homedefeats INT(2) UNSIGNED NOT NULL, homedraws INT(2) UNSIGNED NOT NULL, homefor INT(3) UNSIGNED NOT NULL, homeagainst INT(3) UNSIGNED NOT NULL, awaywins INT(2) UNSIGNED NOT NULL, awaydefeats INT(2) UNSIGNED NOT NULL, awaydraws INT(2) UNSIGNED NOT NULL, awayfor INT(3) UNSIGNED NOT NULL, awayagainst INT(3) UNSIGNED NOT NULL, points INT(3) UNSIGNED NOT NULL, goaldiff INT(4) NOT NULL, PRIMARY KEY(season, age, team) ); show tables; describe teams; describe results; describe leagueTable; EOF INITIALDATATEAMS.BASH - file exectuable data for database mysql -B <<EOF use Tadburnfc; #INSERT INTO teams ( season, age, team ) VALUES (\"2003/04\", \"Under 9 Blue\", \"Tadburn Panthers\"); #INSERT INTO leagueTable ( # season, # age, # team, # played, # homewins, # homedefeats, # homedraws, # homefor, # homeagainst, # awaywins, # awaydefeats, # awaydraws, # awayfor, # awayagainst, # points, # goaldiff ) #INSERT INTO leagueTable ( season, age, team) VALUES ( \"2003/04\", \"Under 9 Blue\", \"Tadburn Panthers\"); INSERT INTO leagueTable ( season, age, team) VALUES ( \"2003/04\", \"Under 9 Blue\", \"Townhill Cobras\"); INSERT INTO leagueTable ( season, age, team) VALUES ( \"2003/04\", \"Under 9 Blue\", \"Earls Rangers\"); INSERT INTO leagueTable ( season, age, team) VALUES ( \"2003/04\", \"Under 9 Blue\", \"Colden Common B\"); INSERT INTO leagueTable ( season, age, team) VALUES ( \"2003/04\", \"Under 9 Blue\",\"Dougland\"); INSERT INTO leagueTable ( season, age, team) VALUES ( \"2003/04\", \"Under 9 Blue\", \"Pace Cougars\"); INSERT INTO leagueTable ( season, age, team) VALUES ( \"2003/04\", \"Under 9 Blue\", \"East Park Rangers\"); INSERT INTO leagueTable ( season, age, team) VALUES ( \"2003/04\", \"Under 9 Blue\", \"Brendon\"); INSERT INTO leagueTable ( season, age, team) VALUES ( \"2003/04\", \"Under 9 Blue\", \"Littleton Lions\"); INSERT INTO leagueTable ( season, age, team) VALUES ( \"2003/04\", \"Under 10 Red\", \"Albion Rovers\"); INSERT INTO leagueTable ( season, age, team) VALUES ( \"2003/04\", \"Under 10 Red\", \"Winchester\"); INSERT INTO leagueTable ( season, age, team) VALUES ( \"2003/04\", \"Under 10 Red\", \"Langley Manor\"); INSERT INTO leagueTable ( season, age, team) VALUES ( \"2003/04\", \"Under 10 Red\", \"Tadburn Cougars\"); INSERT INTO leagueTable ( season, age, team) VALUES ( \"2003/04\", \"Under 10 Red\", \"Marchwood Black\"); INSERT INTO leagueTable ( season, age, team) VALUES ( \"2003/04\", \"Under 10 Red\", \"S&D\"); INSERT INTO leagueTable ( season, age, team) VALUES ( \"2003/04\", \"Under 10 Red\", \"Baddesley Park\"); INSERT INTO leagueTable ( season, age, team) VALUES ( \"2003/04\", \"Under 10 Red\", \"Littleton Leopards\"); INSERT INTO leagueTable ( season, age, team) VALUES ( \"2003/04\", \"Under 10 Blue\", \"Colden Common B\"); INSERT INTO leagueTable ( season, age, team) VALUES ( \"2003/04\", \"Under 10 Blue\", \"Millbrook Lions\"); INSERT INTO leagueTable ( season, age, team) VALUES ( \"2003/04\", \"Under 10 Blue\", \"Colden Common A\"); INSERT INTO leagueTable ( season, age, team) VALUES ( \"2003/04\", \"Under 10 Blue\",\"Michelmersh & Timsbury\"); INSERT INTO leagueTable ( season, age, team) VALUES ( \"2003/04\", \"Under 10 Blue\", \"East Park Rangers\"); INSERT INTO leagueTable ( season, age, team) VALUES ( \"2003/04\", \"Under 10 Blue\", \"Littleton Lynx\"); INSERT INTO leagueTable ( season, age, team) VALUES ( \"2003/04\", \"Under 10 Blue\", \"Dougland Blue\"); INSERT INTO leagueTable ( season, age, team) VALUES ( \"2003/04\", \"Under 10 Blue\", \"Hythe Strikers\"); INSERT INTO leagueTable ( season, age, team) VALUES ( \"2003/04\", \"Under 10 Blue\", \"Townhill Eagles\"); INSERT INTO leagueTable ( season, age, team) VALUES ( \"2003/04\", \"Under 10 Blue\", \"Tadburn Panthers\"); INSERT INTO leagueTable ( season, age, team) VALUES ( \"2003/04\", \"Under 15s\", \"Ice Sports\"); INSERT INTO leagueTable ( season, age, team) VALUES ( \"2003/04\", \"Under 15s\",\"Albion\"); INSERT INTO leagueTable ( season, age, team) VALUES ( \"2003/04\", \"Under 15s\", \"Testwood\"); INSERT INTO leagueTable ( season, age, team) VALUES ( \"2003/04\", \"Under 15s\", \"Mansbridge\"); INSERT INTO leagueTable ( season, age, team) VALUES ( \"2003/04\", \"Under 15s\", \"Botley\"); INSERT INTO leagueTable ( season, age, team) VALUES ( \"2003/04\", \"Under 15s\", \"Colden Common\"); INSERT INTO leagueTable ( season, age, team) VALUES ( \"2003/04\", \"Under 15s\", \"Tadburn\"); INSERT INTO leagueTable ( season, age, team) VALUES ( \"2003/04\", \"Under 13s\", \"Tadburn\"); INSERT INTO leagueTable ( season, age, team) VALUES ( \"2003/04\", \"Under 13s\", \"Fawley\"); INSERT INTO leagueTable ( season, age, team) VALUES ( \"2003/04\", \"Under 13s\",\"Hiltingbury\"); INSERT INTO leagueTable ( season, age, team) VALUES ( \"2003/04\", \"Under 13s\", \"Springhill\"); INSERT INTO leagueTable ( season, age, team) VALUES ( \"2003/04\", \"Under 13s\", \"St Francis C\"); INSERT INTO leagueTable ( season, age, team) VALUES ( \"2003/04\", \"Under 13s\", \"Calmore\"); INSERT INTO leagueTable ( season, age, team) VALUES ( \"2003/04\", \"Under 13s\", \"Winchester\"); INSERT INTO leagueTable ( season, age, team) VALUES ( \"2003/04\", \"Under 13s\", \"Colden Common A\"); INSERT INTO leagueTable ( season, age, team) VALUES ( \"2003/04\", \"Under 13s\", \"Royals\"); INSERT INTO leagueTable ( season, age, team) VALUES ( \"2003/04\", \"Under 12s\", \"Winsor\"); INSERT INTO leagueTable ( season, age, team) VALUES ( \"2003/04\", \"Under 12s\",\"Lordswood A\"); INSERT INTO leagueTable ( season, age, team) VALUES ( \"2003/04\", \"Under 12s\", \"BTC Solent\"); INSERT INTO leagueTable ( season, age, team) VALUES ( \"2003/04\", \"Under 12s\", \"Itchen\"); INSERT INTO leagueTable ( season, age, team) VALUES ( \"2003/04\", \"Under 12s\", \"Fawley\"); INSERT INTO leagueTable ( season, age, team) VALUES ( \"2003/04\", \"Under 12s\", \"Hythe S A\"); INSERT INTO leagueTable ( season, age, team) VALUES ( \"2003/04\", \"Under 12s\", \"Hythe H\"); INSERT INTO leagueTable ( season, age, team) VALUES ( \"2003/04\", \"Under 12s\", \"Brendon\"); INSERT INTO leagueTable ( season, age, team) VALUES ( \"2003/04\", \"Under 12s\", \"Earls\"); INSERT INTO leagueTable ( season, age, team) VALUES ( \"2003/04\", \"Under 12s\", \"Tadburn\"); INSERT INTO leagueTable ( season, age, team) VALUES ( \"2003/04\", \"Under 11s\", \"Littleton A\"); INSERT INTO leagueTable ( season, age, team) VALUES ( \"2003/04\", \"Under 11s\", \"Testwood\"); INSERT INTO leagueTable ( season, age, team) VALUES ( \"2003/04\", \"Under 11s\", \"Tadburn C\"); INSERT INTO leagueTable ( season, age, team) VALUES ( \"2003/04\", \"Under 11s\",\"Warsash\"); INSERT INTO leagueTable ( season, age, team) VALUES ( \"2003/04\", \"Under 11s\", \"Fawley A\"); INSERT INTO leagueTable ( season, age, team) VALUES ( \"2003/04\", \"Under 11s\", \"Netley\"); INSERT INTO leagueTable ( season, age, team) VALUES ( \"2003/04\", \"Under 11s\", \"St Francis Rangers\"); INSERT INTO leagueTable ( season, age, team) VALUES ( \"2003/04\", \"Under 11s\", \"Ice\"); INSERT INTO leagueTable ( season, age, team) VALUES ( \"2003/04\", \"Under 11s\", \"Calmore\"); INSERT INTO leagueTable ( season, age, team) VALUES ( \"2003/04\", \"Under 11s\", \"Townhill A\"); INSERT INTO leagueTable ( season, age, team) VALUES ( \"2003/04\", \"Under 11s\", \"Tadburn P\"); INSERT INTO leagueTable ( season, age, team) VALUES ( \"2003/04\", \"Under 11s\", \"Alresford\"); INSERT INTO leagueTable ( season, age, team) VALUES ( \"2003/04\", \"Under 11s\", \"Earls S\"); INSERT INTO leagueTable ( season, age, team) VALUES ( \"2003/04\", \"Under 11s\", \"Winsor A\"); INSERT INTO leagueTable ( season, age, team) VALUES ( \"2003/04\", \"Under 11s\", \"Hythe H\"); INSERT INTO leagueTable ( season, age, team) VALUES ( \"2003/04\", \"Under 11s\",\"Regents Park\"); INSERT INTO leagueTable ( season, age, team) VALUES ( \"2003/04\", \"Under 11s\", \"Sky Blues\"); EOF NEWRESULTFORM- Displays new form if not all fileds have been entered. <?php /* Program: NewResultform.inc * Desc: Displays form to collect the result information */ ?> <b>You must fill in all the information to enter the result.</b> <form action=\"AddResult.php\" method=\"post\"> <input type=\"hidden\" name=\"season\" value=\"<?php echo $season ?>\"> <input type=\"hidden\" name=\"fixtureDate\" value=\"<?php echo $fixtureDate ?>\"> <input type=\"hidden\" name=\"age\" value=\"<?php echo $age ?>\"> <input type=\"hidden\" name=\"homeTeam\" value=\"<?php echo $homeTeam ?>\"> <input type=\"hidden\" name=\"homeScore\" value=\"<?php echo $homeScore ?>\"> <input type=\"hidden\" name=\"awayTeam\" value=\"<?php echo $awayTeam ?>\"> <input type=\"hidden\" name=\"awayScore\" value=\"<?php echo $awayScore ?>\"> <p><input type=\"submit\" name=\"newbutton\" value=\"Enter new result\"> <input type=\"submit\" name=\"newbutton\" value=\"Cancel\"> </form> NewResulttable.inc - for to show new results. <?php /* Program: NewResulttable.inc * Desc: Displays table to enter the results */ ?> <center> <b><font face=\"Arial, Helvetica, sans-serif\" size=\"+3\" color=\"#0000FF\">Results</font></b> </center> <br> <br> <font face=\"Arial, Helvetica, sans-serif\" size=\"+1\" color=\"#0000FF\"> <p>Enter the football score on the form below !!</p> <br> <br> <font face=\"Arial, Helvetica, sans-serif\" color=\"#0000FF\"> <table border=\"0\"> <tr><td align=\"right\">Season :</td> <td><input type=\"text\" name=\"season\" value=\"<?php echo $season ?>\" size=\"7\" maxlength=\"7\"> (enter season as 2003/04)</td> <tr><td align=\"right\">Fixture Date :</td> <td><input type=\"text\" name=\"fixtureDate\" value=\"<?php echo $fixtureDate ?>\" size=\"12\" maxlength=\"12\"> (enter date as 2003-mm-dd)</td> </tr> <tr><td align=\"right\">Age Group :</td> <td><input type=\"text\" name=\"age\" value=\"<?php echo $Condition ?>\" size=\"15\" maxlength=\"15\"> </td></tr> <tr><td align=\"right\">Home Team :</td> <td><input type=\"text\" name=\"homeTeam\" value=\"<?php echo $homeTeam ?>\" size=\"30\" maxlength=\"30\"> </td></tr> <tr><td align=\"right\">Home Score :</td> <td><input type=\"text\" name=\"homeScore\" value=\"<?php echo $homeScore ?>\" size=\"3\" maxlength=\"3\"> <tr><td align=\"right\">Away Team :</td> <td><input type=\"text\" name=\"awayTeam\" value=\"<?php echo $awayTeam ?>\" size=\"30\" maxlength=\"30\"> </td></tr> <tr><td align=\"right\">Away Score :</td> <td><input type=\"text\" name=\"awayScore\" value=\"<?php echo $awayScore ?>\" size=\"3\" maxlength=\"3\"> </table> </font> results.php - allows user to enter results. <?php /* Program: Results.php * Desc: Allows the Administrator to enter the football * results which updates the tables. */ ?> <HTML> <HEAD> <TITLE>Results</TITLE> <STYLE> <!-- A {text-decoration: none; color:#00008B} --> </STYLE> </HEAD> <BODY BGCOLOR=\"FAFAD2\" TEXT=\"00008B\" LINK=\"00008B\" VLINK=\"00008B\" ALINK=\"00008B\"> <?php include(\"connection.inc\"); $connection = mysql_connect($host,$user,$password) or die (\"couldn\'t connect to server\"); $db = mysql_select_db($database,$connection) or die (\"Couldn\'t select database\"); /* create form */ echo \"<form action=\'AddResult.php\' method=\'post\'>n\"; include(\"NewResulttable.inc\"); echo \"<p><input type=\'submit\' value=\'Submit Result\'> <input type=\'submit\' name=\'newbutton\' value=\'Cancel\'> </form>n\"; ?> </div> </body> </html> </BODY> </HTML> Any help with my website would be much appreciated. Regards, Andy M.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.