I'm drawing a blank on how to append the iteration number to the variable name..
if ( isset($_POST['multi_reg']) ) {
for ($i=1; $i <= $_POST['multi_reg']; $i++) {
echo "<LABEL FOR=lastname$i>Last name:</LABEL>";
echo "<INPUT name=\"$lastname.$i\" value=\"
if (isset($lastname.$i)) {
echo $lastname.$i;
}
echo "\">";
basically, I ask the user how many people they want to register and then I want PHP to create that many text boxes and assign variables as such:
$lastname1
$lastname2
etc...
what syntax do I use to append the text "lastname" to the variable result $i and use it as a new variable name?
Thanks!
Chad