Jump to content

tarmer

New Members
  • Posts

    6
  • Joined

  • Last visited

tarmer's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. figured it out - was missing closing } - But now does not read the entire file
  2. Any idea where i can find this information - I fixed the above error and it still gives me a 500 error
  3. No.. I did not - Thank you for pointing that out - I really appreciate all the help here
  4. Where exactly would this go - I tried changing this : // start new row echo '<tr class="' . $bg[$win] . '">'; // put exploded data in as <td> element for ($j = 0; $j <= $columns; $j++) { $data[$j] = str_replace('"','',$data[$j]); if ($j == 0) echo '<td><img src="' . $flag_dir . $countries[$data[$j]] . '.jpg" alt="' . $data[$j] . '" /></td>'; else echo '<td>' . $data[$j] . '</td>'; } to this // start new row echo '<tr class="' . $bg[$win] . '">'; // put exploded data in as <td> element for ($j = 0; $j <= $columns; $j++) { $data[$j] = str_replace('"','',$data[$j]); // players country flag if ($j == 0) { echo '<td><img src="' . $flag_dir . $countries[$data[$j]] . '.jpg" alt="' . $data[$j] . '" /></td>'; } // the players name column - output it as a link elseif($j == 1) { echo '<td><a href="player_details.php?player=' . urlencode($data[$j) . '" alt="View ' . htmlentities($data[$j]) . ' Info">' . htmlentities($data[$j]) . '</a></td>'; } else echo '<td>' . $data[$j] . '</td>'; But it was giving me a 500 Internal Server Error - Any thoughts ? - Is it because it was looking for the "echo '<td><a href="player_details.php?player='" that has not been created yet ? Not the problem - as I tried it without this href Thanks again for all
  5. Thank You for the update and direction - It is much appreciated - the players details would probably be kept in a seperate php or html file (it has not been implemented as it is a "new" thought on this
  6. Hello, I hope you guys can help me out (at least point me in the write direction) - I am very green and am trying to work my way thru this as best I can - I am not a programmer, But am trying to learn a few things to make this task easier I run an fantasy soccer site - And right now all the stats are stored in excel files (manually updated) and then exported to csv files - I have a php file that turns them into a table and shows the results.. http://tonyarmer.net/WSL/LIGA/Valencia.php (as you see it outputs the page with the csv information. Now this is all fine (but a lot of work) as every week the numbers change and they have to be added in the excel file and updated and re-exported - My question is in 2 parts... First part - The rows that show up in the link above are constant and unchanging - the numbers in those rows will update and change all the time, as a game is played the associated numbers will have to be added to to update the player statistics. I have thought about putting all this in mySQL and updating it that way and trying to pull from the database - I see what I could use as the tables (from what is listed in the csv file) but not sure the direction to take there (any thoughts) Second Part (I have posted the code below) - This is a very poorly written piece of code but it does work - What I am trying to figure out is, How can I re-write (or add) to the code to make the player name as a clickable link that will take you to another page that shows more detail, City of birth, height, weight and I would move the stats to this page as well - Now I know doing this in mySQL would help (If I had any idea of what to do, which would include adding the weekly stats together to get totals).... But how could this be handled in just php with a csv file - ANY HELP would be greatly appreciated <body> <body style="background-color: transparent;"> <table border="0" width="100%" cellspacing="1" cellpadding="2" bgcolor=" 1F4B6B" > <tr>'; echo '<tr>'; // put exploded first line in as <th> element for ($j = 0; $j <= $columns; $j++) { $data[$j] = str_replace('"','',$data[$j]); echo '<th>' . $data[$j] . '</th>'; } // end first table row echo '</tr>'; $win = 0; // run through remaining lines for ($i = 1; $i <= sizeof($lines)-1; $i++) { // explode line $data = explode(",", $lines[$i]); // start new row echo '<tr class="' . $bg[$win] . '">'; // put exploded data in as <td> element for ($j = 0; $j <= $columns; $j++) { $data[$j] = str_replace('"','',$data[$j]); if ($j == 0) echo '<td><img src="' . $flag_dir . $countries[$data[$j]] . '.jpg" alt="' . $data[$j] . '" /></td>'; else echo '<td>' . $data[$j] . '</td>'; } // end row echo '</tr>'; $win == 1 ? $win = 0 : $win = 1; } // close table tag echo '</table>'; ?> <hr> <H2>CUPS</H2> <img src='http://www.tonyarmer.net/WSL/LIGA/55.png' /></a> Champions Cup x0 <img src='http://www.tonyarmer.net/WSL/LIGA/1.png' /></a>WSL Cup x0 <img src='http://www.tonyarmer.net/WSL/LIGA/cltrophy.png' /></a>Liga Cup x0 <hr>
×
×
  • 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.