Page 1 of 1

Textbox value

Posted: Mon Jan 10, 2005 7:41 pm
by S_henry
In page A, i have use textbox to dispay list of records using loop (for). I named that textbox 'txtStudent<?php echo $i ?>' with variable $i is the index (get the value from looping). After I've puts the value into all of the textbox, i post(submit) that page A to page B. The problem is, in page B, I don't know how to retrieve the value of the textbox (txtStudent<?php echo $i ?>). Can anybody help me pls..thanx.

Posted: Mon Jan 10, 2005 7:48 pm
by rehfeld

Code: Select all

<?php

$i = 0;
while (isset($_POST&#1111;'txtStudent' . $i])) &#123;
    echo $_POST&#1111;'txtStudent' . $i];
    $i++;
&#125;

?>

Posted: Tue Jan 11, 2005 7:50 pm
by S_henry
OK. Thanx rehfeld for your help. :D