|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
marco5 Smarty Rookie
Joined: 28 Jul 2003 Posts: 19
|
Posted: Tue Jul 29, 2003 6:58 pm Post subject: Re: Multiple Form Issue |
|
|
reformed1 wrote: | Is there a Smarty problem with using multiple form values with the same name? For instance, I have a script that outputs many records so a user can delete or edit the records in a database, normally I would use something like this to capture the values for all of fields into an array:
Code: | <input type="text" name="userId[]"> |
userId would then contain the values of the form in an array, but I'm not getting that result now, all I get is the last record in the form instead of the array. Any suggestions? |
now i dun understand ur question again~_~
what do u actually want to ask!!? |
|
Back to top |
|
sagi Smarty Regular
Joined: 30 Jul 2003 Posts: 43
|
Posted: Wed Jul 30, 2003 2:43 pm Post subject: |
|
|
reformed1 wrote: | My problem is that I'm not getting any values, except the last one in the form. Your script will definately help handle an emtpy array, but I'm trying to find out why my array is empty. Do mulitiple values work with the get method? Maybe that's my problem. Also, I'm using the print_r('userId') function to look at my array. |
Thats because print_r('userId') will print the string 'userId'.
If you want to print the values in that array, use:
print_r($userId);
And this is a PHP issue, it really has nothing to do with smarty. |
|
Back to top |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|