Switch17
08-07-2002, 10:35 PM
I'm still pretty raw at learning php and mysql, but from alot of reading here and help elsewhere, I've made at lot of progress and getting closer. I'm hoping some of you can help me figure out what I have wrong here. I'm trying to begin by getting my index page to shot my report menu's correctly. This is a followup to my original post here
Here (http://www.codingforums.com/showthread.php?s=&threadid=3242). I've included some cut and pastes from what I've done so far, that I'm hoping someone can find where I'm going wrong. Some of this is a copy from a buddy helping me, but it should all work (except for some pics)
index.htm
</head>
<?php require "file_defs.php" ?>
<BODY class=csspg leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<table border=0 width=100% cellspacing=0 cellpadding=0>
<tr class=nebula><td height=50 valign=middle align=center><img src="logo1.gif"></td></tr>
<tr class=bar><td height=25 valign=middle nowrap align=center><?php require "week_menu.php" ?></td></tr>
</table>
<table border=0 height=100% width=100% cellspacing=0 cellpadding=0>
<tr height=1000 valign=top><td bgcolor="#000040" width=132 nowrap><?php require "vertical_menu.php" ?></td>
<td width=15 valign=top class=skip2><img src="./../grafix/corner.gif" border="0"></td>
<td><br><left>
<!-- MAIN BODY -->
file_defs.php
<?php
$user="freedffl";
$host="localhost";
$password="xxxxxxx";
mysql_connect($host,$user,$password);
mysql_select_db("freedffl_com");
$query = "SELECT latest_week FROM week_index WHERE season=2001";
$result = mysql_query($query);
$row = mysql_fetch_row($result);
if (!isset($week)) {
$week=$row[0];
$lastweek = $week;
}
else $lastweek = $row[0];
if (!isset($report)) $report=0;
if (!isset($antes)) $antes = "";
$SYWC = "01";
if ($week < 10) $SYWC .= "0";
$SYWC .= $week;
$ext = ".php?week=".$week."&report=";
$FL[0] = "_standings".$ext."0";
$FL[1] = "_tiesum".$ext."1";
week_index
CREATE TABLE week_index (
ID int(11) NOT NULL auto_increment,
season year(4) NOT NULL default '0000',
latest_week char(4) NOT NULL default '0',
PRIMARY KEY (ID)
) TYPE=MyISAM;
# Dumping data for table `week_index`
INSERT INTO week_index VALUES (1,'2001','0101');
INSERT INTO week_index VALUES (2,'2001','0102');
and vertical_menu.php
<?php
$options = "\" style=\"color: #BBBBBB; text-decoration:none; cursor: hand;\" onMouseOver=\"flash(this)\" onMouseOut=\"deflash(this)\"";
?>
<center><?php
if ($antes != "") echo ("<img src=\"grafix/mfl-10.png\" border=0>");
else echo ("<a href=\"../\"><img src=\"../grafix/mfl-10.png\" border=0 alt=\"Jump to MFL main page.\"></a>");
?></center><p>
<span class=menured>Weekly Reports</span><br>
<a href="<? echo($antes.$SYWC.$FL[0].$options); ?>><span class=item>Scores and Standings</span></a><br>
<a href="<? echo($antes.$SYWC.$FL[1].$options); ?>><span class=item>Tiebreaker Summary</span></a><br>
Can anyone help?
Here (http://www.codingforums.com/showthread.php?s=&threadid=3242). I've included some cut and pastes from what I've done so far, that I'm hoping someone can find where I'm going wrong. Some of this is a copy from a buddy helping me, but it should all work (except for some pics)
index.htm
</head>
<?php require "file_defs.php" ?>
<BODY class=csspg leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<table border=0 width=100% cellspacing=0 cellpadding=0>
<tr class=nebula><td height=50 valign=middle align=center><img src="logo1.gif"></td></tr>
<tr class=bar><td height=25 valign=middle nowrap align=center><?php require "week_menu.php" ?></td></tr>
</table>
<table border=0 height=100% width=100% cellspacing=0 cellpadding=0>
<tr height=1000 valign=top><td bgcolor="#000040" width=132 nowrap><?php require "vertical_menu.php" ?></td>
<td width=15 valign=top class=skip2><img src="./../grafix/corner.gif" border="0"></td>
<td><br><left>
<!-- MAIN BODY -->
file_defs.php
<?php
$user="freedffl";
$host="localhost";
$password="xxxxxxx";
mysql_connect($host,$user,$password);
mysql_select_db("freedffl_com");
$query = "SELECT latest_week FROM week_index WHERE season=2001";
$result = mysql_query($query);
$row = mysql_fetch_row($result);
if (!isset($week)) {
$week=$row[0];
$lastweek = $week;
}
else $lastweek = $row[0];
if (!isset($report)) $report=0;
if (!isset($antes)) $antes = "";
$SYWC = "01";
if ($week < 10) $SYWC .= "0";
$SYWC .= $week;
$ext = ".php?week=".$week."&report=";
$FL[0] = "_standings".$ext."0";
$FL[1] = "_tiesum".$ext."1";
week_index
CREATE TABLE week_index (
ID int(11) NOT NULL auto_increment,
season year(4) NOT NULL default '0000',
latest_week char(4) NOT NULL default '0',
PRIMARY KEY (ID)
) TYPE=MyISAM;
# Dumping data for table `week_index`
INSERT INTO week_index VALUES (1,'2001','0101');
INSERT INTO week_index VALUES (2,'2001','0102');
and vertical_menu.php
<?php
$options = "\" style=\"color: #BBBBBB; text-decoration:none; cursor: hand;\" onMouseOver=\"flash(this)\" onMouseOut=\"deflash(this)\"";
?>
<center><?php
if ($antes != "") echo ("<img src=\"grafix/mfl-10.png\" border=0>");
else echo ("<a href=\"../\"><img src=\"../grafix/mfl-10.png\" border=0 alt=\"Jump to MFL main page.\"></a>");
?></center><p>
<span class=menured>Weekly Reports</span><br>
<a href="<? echo($antes.$SYWC.$FL[0].$options); ?>><span class=item>Scores and Standings</span></a><br>
<a href="<? echo($antes.$SYWC.$FL[1].$options); ?>><span class=item>Tiebreaker Summary</span></a><br>
Can anyone help?