rogerzebra
Technical User
Hi all I hope you're doing well,
I was hoping for some help with an issue I have on how to print a dynamic result from a query and use the query result together with input type textfields?
It seems that this needs an thorough explanation.
I have a formpage (step1)were a query has been generated based on how many textfields(classcodes)been filled in.The result from step1 is shown on a new page. here is some code
My problem is a) Part of the result has been generated from the database the "%s", So how to use prinf together with input type text fields and were the value is a variable? Something like
....and if it's more than one classcode. Generate next value like:
b) the input type fields value ($variable/variables)is supposed to be calculated in step 3. As I said, my formpage is dynamic, the number of filled in textfields generates the same number of rows.
So, my problem is how to generate variables in the input type textfields dynamicly? like textfield1 =$variable1 if textfield2 is filled out aswell give it the $variable2 etc..
I have those two pieces working separate but I can't get those two pieces to work together. Any ideas?
I understand if this is hard to stift thru so any help what so ever is greately welcome.
Thanks and have a nice day
I was hoping for some help with an issue I have on how to print a dynamic result from a query and use the query result together with input type textfields?
It seems that this needs an thorough explanation.
I have a formpage (step1)were a query has been generated based on how many textfields(classcodes)been filled in.The result from step1 is shown on a new page. here is some code
Code:
if ($myrow = mysql_fetch_array($result))
{
echo "<tr><td><b>ClassCode</b></td><td><b>Classification</b><td><b>Rate</b></td>...jada,jada
do {
printf("<tr><td>%s</td><td>%s</td>...jada,jada
My problem is a) Part of the result has been generated from the database the "%s", So how to use prinf together with input type text fields and were the value is a variable? Something like
Code:
<td>%s</td><td><input type='text' name='PremiumBasis' value=\"$PremiumBase1\"</td>%s<td>
....and if it's more than one classcode. Generate next value like:
Code:
<td>%s</td><td><input type='text' name='PremiumBasis' value=\"$PremiumBase2\"</td>%s<td>
b) the input type fields value ($variable/variables)is supposed to be calculated in step 3. As I said, my formpage is dynamic, the number of filled in textfields generates the same number of rows.
So, my problem is how to generate variables in the input type textfields dynamicly? like textfield1 =$variable1 if textfield2 is filled out aswell give it the $variable2 etc..
I have those two pieces working separate but I can't get those two pieces to work together. Any ideas?
I understand if this is hard to stift thru so any help what so ever is greately welcome.
Thanks and have a nice day