Hey there,
ok, I have tackled php and mysql, and made some real headway (or so I think). I have run into a problem, hoping you folks can help me out yet again.
I have a mysql database of competitor info (names, scores, etc). This data is displayed in a table, no problem. CSS styled and everything, looking great.
Now, I have put FPDF in place to generate a pdf document when a user clicks a link next to a competitor’s name.
So here’s the problem: How do I get mysql to retrieve the data for the current row, without coding it in, and without the advantage of any other frame of reference, other than the row itself?
Currently, it will retrieve 1 row, but it is always just the first row in the db. I have put the link to generate the pdf (and thus retrieve the mysql data) into a field in each row of the mysql table. So it is a bit self-referential.
I can, of course, hard code into the php which row to get, and that works perfect, except that I don’t want 3,000 different php files!
Here is my relevant code:
//Select the fields you want to show in your PDF file
$result=mysql_query("SELECT Division, Place, Handler, Dog, Club, D, I, S, C, FS1, TC1, Total FROM $table");
$row = mysql_fetch_array($result, MYSQL_ASSOC);
Here is a link to the page, so you can see what it actually looks like:
http://www.coloradodiscdogs.com/events/2008/test/ft_collins_2008.php
Thanks…