i made a form to get data from user to buy a book i used form validation of Codeigniter, when data follow rules database accept data and show it to user, in show result page i put a button to back to first page and change data.
but i want first page show data from database not empty text input.
form with form validation: (it is only for first name)
<?php if($errors= validation_errors()):?>
<div class="alert alert-danger">
<?php echo $errors; ?>
</div>
<?php endif;?>
<form action="<?php echo base_url();?>my_site/check_data_entry" method="post" >
<div>
<label>first name</label>
<input type="text" name="txt_fname" value="<?php echo set_value('txt_fname'); ?>" required>
<?php echo form_error('txt_fname');?>
</div>
i made check_data_entry to check data validation, after accept the data user can see result page i want user to be able to edit data from database in first page, i redirect user to first page but i don't know how to show data in first name text input, set_value seems should have second data but this time from database but how? i don't know, i send an array from database to this page .
please show me solution. thank you