Page 1 of 1

how i post an array elements in php??

Posted: Sat Jun 24, 2006 6:25 am
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]

Posted: Sat Jun 24, 2006 9:25 am
by feyd
sessionName[]

and please, use the syntax highlighting tags we provide. Also, did we need all the question marks?

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

Posted: Sat Jun 24, 2006 10:28 am
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