Most of this weekend has been spent grasping the basics of mysql and I have finally managed to get a database uploaded to my ISP's server. Database is 34 columns across and 471 rows downwards. The first column has 001, 002, 003 (etc.) downwards on the rows. All fields are named (first one is just called "number").
I have managed to code in the php connection to the database to get the output at http://ccgi.rollobks...lishvocab11.php .
(using the following code)
$db = mysql_connect("hostname","username","password");
$SQL="SELECT * FROM tablename";
I also previously managed to get the output at http://ccgi.rollobks...lishvocab02.php to register the number of rows (at the top, in black) using slightly different coding of
$link = mysql_connect("hostname","username","password");
$db_selected = mysql_select_db('database_name', $link);
$result = mysql_query("SELECT * FROM tablename", $link);
$num_rows = mysql_num_rows($result);
echo "$num_rows Rows\n";
so I'm assuming that the polishvocab11.php page also has a working connection to the db (as no errors were generated when calling up the page).
I need help (please!) with three things.
Firstly how to get php to call up the content of one row at a time (so as to fill in the blanks for English 01, XXXXlang 01, etc. which are fields in the database, and where I understand "echo" commands are needed at the relevant points in the html template where currently there are %%xxxx%% entries.
Secondly how to then get php to call up the "next row" against the same html template (right through the 471 rows) so that each newly-generated page has the right content from the called-up line of the database.
Thirdly how to get php to give the output page a new URL with the format
<BASE HREF="http://www.happychil... no%%.htm">
so that I can store the 471 outputs as (separate) static html pages.
I'm not sure if this is something of a tall order! but it's what I need to achieve, and time is at something of a premium right now.
I also need to know how to call up a specific table cell (given the parameters of field name and the numerical entry in the first column, which seemed the most logical way to identify separate rows) in order to achieve output pages like http://www.happychil...useoverview.htm .
I'm involved in a (fairly huge) project to provide free dual-language worksheets for kids, for a number of languages including Romanian-English, Polish-English, Bulgarian-English, Russian-English etc., and several of the translated databases will be ready soon [all the translations are being done in similar formats]. The overview page content was achieved previously (for the English-French content) by using mail-merge on MS Works against an MS Works db (and then pasting each lot of table contents onto the page), but because of the length of the foreign-language-character entries (much of which have had to be converted into hex codes) the program truncates them, so I need to find a way of calling up a single cell at a time, to get the full text, but by a more automated process.
Logic tells me it must be possible! but I simply can't get the content of individual cells in the database to be called up by the PHP code to appear on the page. If any of you PHP experts could help I would very much appreciate this Project HappyChild is "not for profit" and run very much on a shoestring, so there's no "profit motive" in doing this, but it will make a lot of difference for kids in various countries.
And I will be slightly saner if I can find a workaround for this - have tried out *loads* of PHP text copied laboriously from lots of tutorials but don't have the time to give to endlessly experimenting when I seem to be getting absolutely nowhere :/
Sorry this first post is so very long but I figured it might help if I explained something about why this needs to be done and exactly what help is needed, if anyone could explain what I need to do. I'm not the most "technically-minded" of people! but I do grasp things *eventually*