Hi.
I'm building a script that displays latest announcements. One page has the form, which, based on how many spots are open for announcements, displays the appropriate number of textboxes. Each textbox is then named $message1, $message2, etc. The form calls the script with the execution code on it.
In that code, I pull the total number of message spots, and then use a while loop to insert the contents of the form into the database. What I want to happen is -
while($counter < ($total+1)){
insert $message1 into spot1
}
and everytime the loop executes, it inserts the right message into the right spot in the database. This requires the variable name to be built inside the while loop... but how?
The numeral needs to be changed so the script knows which $message var contents to insert when.
Thanks