get the value of a textbox to a variable

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

get the value of a textbox to a variable

Post by greeshma »

I create one php page for add a course and its modules to database.i have the text field for number of course modules.depends on that number of modules i want to create the table rows using "for" loop.The "for" loops limit is that number of modules.
<input type='text' name='numberofmodules' >
$numberofmodules=????????????????? here how i get the value of the above text box without submitting the form
for($i=1;$i<=numberofmodules;$i++)
{
<tr><td><input type='text' name='sessName' size='15'></td></tr>????????here how i change the name of the textbox depending on the "for" loop???
}

2.After submitting this form how can i get the value of the whole fields.I used post method and i can't get that array value..

3.How we post an array from one php page to another?
User avatar
Kadanis
Forum Contributor
Posts: 180
Joined: Tue Jun 20, 2006 8:55 am
Location: Dorset, UK
Contact:

Post by Kadanis »

PHP is a server side language which means the data in the form must be submited to the server before it can be processed. To access variables in form objects without submitting the form you would have to use a client side language like JavaScript.
Post Reply