I just have two columns (textCL and infoCL). Each column has only one row.
Rather, you mean to say that the table only has one row.
will the textID primary key work for both columns?
textID is the primary key of the table, not any particular column in the table.
can I use $txt & $nfo variables as values?
Of course, since the PHP interpreter will substitute the appropriate values. However, if those variables are from incoming variables (e.g., from $_POST), you should use [man]mysql_real_escape_string/man on them first.
The book examples use text in quotes.
The book is correct. You need to use single quotes. Assuming that the variables have been escaped:
$query = "INSERT INTO textTB ( textCL, infoCL ) VALUES ( '$txt', '$nfo' )";
are the textIDs correct set to zero for both columns?
They are more likely to be 1. You can update both columns in a single query:
$query = "UPDATE textTB SET textCL='$txt', infoCL='$nfo' WHERE textID=1";
Do I need the asterik? Isn't that for all the rows in a column.
Yes, "SELECT *" means "select all", and you usually do not need to select all the columns. In this case there are only two columns and you want both, so it does not really matter.
I just need the values from the two DB files placed into text variables, $txt and $nfo. I don't need an array (fetch_array) with one file per column, but that may be the only option.
It does look like you are treating the database as a combination of two files 🙂
I think that [man]list/man comes in handy here:
$result = mysql_query("SELECT textCL, infoCL FROM textTB WHERE textID=1");
list($txt, $nfo) = mysql_fetch_assoc($result);