Hi,
I have a form on a page that has 5 text fields (tfield0, tfield1, tfield2 etc etc) which once the form is processed, it creates an array with the 5 values from the text fields and puts into database.
Here's some of the code:
$thedata = array();
$tcount = 5
$i = 0;
while ($tcount != 0) {
$thedata[] = $tfield[$i];
$i++;
$tcount--;
}
$thevar = implode("<sp>", $thedata);
For example, the values in the 5 text boxes where a,b,c,d,e. Then I would expect $thevar to equal "a<sp>b<sp>c<sp>d<sp>e"
But it is blank. What am I doing wrong?
Thanks in advance.
I have a form on a page that has 5 text fields (tfield0, tfield1, tfield2 etc etc) which once the form is processed, it creates an array with the 5 values from the text fields and puts into database.
Here's some of the code:
$thedata = array();
$tcount = 5
$i = 0;
while ($tcount != 0) {
$thedata[] = $tfield[$i];
$i++;
$tcount--;
}
$thevar = implode("<sp>", $thedata);
For example, the values in the 5 text boxes where a,b,c,d,e. Then I would expect $thevar to equal "a<sp>b<sp>c<sp>d<sp>e"
But it is blank. What am I doing wrong?
Thanks in advance.