Welcome Guest, Not a member yet? Register   Sign In
[ SOLVED ]Radio button & Form Validation
#1

[eluser]Redwhirl[/eluser]
Hi,

First time I use radio button, and I'm really lost

My controller has this code
$this->load->library('form_validation');
$this->load->view('tickets');

The view 'tickets' has this code

<?php form_open('pay_now','buy_now'); ?>
<?php echo form_radio("buy_tickets", "1", TRUE); ?>
<?php echo form_radio("buy_tickets", "2" ); ?>
<?php echo form_radio("buy_tickets", "3" ); ?>
<?php echo form_radio("buy_tickets", "4" ); ?>
<?php echo form_radio("buy_tickets", "5" ); ?>
&lt;input type="submit" value="Purchase Tickets"&gt;&lt;/a></td>
&lt;?php form_close(); ?&gt;

From here, I am lost....

How can I retrieve which radio button has been checked after validation

Some help would be fine

Hubert
#2

[eluser]tonanbarbarian[/eluser]
you really need to provide some more info
can you provide the controller that you have used to create the form and what code are you trying to use to retrieve the values
in particular your form is submitting to a strange location
#3

[eluser]Redwhirl[/eluser]
Thanks

I have found another way to do it




Theme © iAndrew 2016 - Forum software by © MyBB