BIBEKRBARAL
BIBEKRBARAL

Reputation: 4475

Getting multiple value from form in php

in my application, i am using form to submit using php but the problem is i have dynamic value in view that is according to option, values comes.Sometimes 2 textbox will appear or sometimes 4, 5 etc. i am using to check the value by var_dump($_post), it will display all but the problem is how to get exact field with value?

Thanks

Upvotes: 0

Views: 579

Answers (2)

Eitrix
Eitrix

Reputation: 116

use the

$_REQUEST['name_of_field'] 

it will be holding the value you submited for that field

Upvotes: 0

Ólafur Waage
Ólafur Waage

Reputation: 70001

You can have the name of the input fields / checkboxes as an array

<input type="text" name="stuff[]" />
<input type="text" name="stuff[]" />
<input type="text" name="stuff[]" />

Upvotes: 1

Related Questions