Jump to content

Small piece of PHP help


fraser5002

Recommended Posts

Small bit of help

 

Hi i have 300 text boxes on the screen and i press update this will update my database

 

All my text boxes are call "T1" T2" "T3" etc etc

 

im using this code to collect all the text boxes values together after the update button has been presses

 

$i = 0;

while ($i < 300) {

$temp[$i] = $_POST["T"+$i];

$i++;

}

 

 

As i expected this code does not work  it i just call all the text boxes 1,2,3,4,5 etc etc and use the following code it does work however

 

$i = 0;

while ($i < 300) {

$temp[$i] = $_POST[$i];

$i++;

}

 

So how do i get it to work when the text box name has a letter prefix as shown before? probably something really simple ! thanks

Link to comment
https://forums.phpfreaks.com/topic/206613-small-piece-of-php-help/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.