codeigniter - How to Post values outside the form in php
916
I need to post values outside the form in php , How to do it
Here is my sample code
<input type="hidden" id="test" name="test" />
<input type="hidden" id="testvalue" name="testvalue"/>
<?Php for($i=0;$i<5;$i++) { ?>
<form action='some_url'>
<input type="text" value="dynamic_value" name='testname'>
<select name="testselect">
<option value="<?php echo $dynamicvalue[$i]?>"><?php echo $dynamicvalue[$i]?></option>
</select>
<button class="btn btn-primary book_now" type="submit">BookNow</button>
</form>
<?php } ?>
i need to post all input values above the form also,since i cannot use that input field inside the loop, i want id to be unique so i cant use inside
any other option available to post all data
Answer
Solution:
Use jQuery:
Answer
Solution:
You can add input fields into for-loop