how i post an array elements in php??

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
greeshma
Forum Newbie
Posts: 3
Joined: Thu Jun 22, 2006 7:25 am

how i post an array elements in php??

Post by greeshma »

feyd | Please use

Code: Select all

,

Code: Select all

and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]


I want to create one table using "for"  loop

         page1.php

Code: Select all

<form method='post' action='submitpage.php'>
                     $limit =5;     
                     <table> 
                     for($i=1;$i<=limit;$i++)
					 {
					<tr><td >
				        <input type='text' name='sessName' size='15'></td></tr>
				        }
                     </table>
                      </form>

in the above text box how i changed the name of it depends on the for loop????????????

again how i post this textboxfield array???????????

In submitpage.php how i post the value of that textbox???????

$name=$_POST[?????????];


feyd | Please use

Code: Select all

,

Code: Select all

and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

sessionName[]

and please, use the syntax highlighting tags we provide. Also, did we need all the question marks?
User avatar
aerodromoi
Forum Contributor
Posts: 230
Joined: Sun May 07, 2006 5:21 am

Re: how i post an array elements in php??

Post by aerodromoi »

greeshma wrote:
In submitpage.php how i post the value of that textbox???????
How about using:

Code: Select all

<input type="submit" value="submit" />
?

Btw: I'd recommend separating html tags and php.

aerodromoi
Post Reply