Welcome Guest, Not a member yet? Register   Sign In
database INSERT and UPDATE converts symbols to html code
#9

(This post was last modified: 03-11-2016, 07:35 AM by webmachine.)

This is the code I use for the form:

PHP Code:
<div class="form-control">
 
    <?php echo form_label('Last Name: ''last_name'); ?><br />
     <?php
          $attributes 
= array(
 
              'id' => 'last_name',
 
              'name' => 'last_name',
 
              'value' => set_value('last_name'$client->last_name)
 
         );
 
        echo form_input($attributes);
 
    ?>
</div> <!-- end of .form-control --> 

In my controller, this is the only validation rule I am using for this input:
PHP Code:
$this->form_validation->set_rules('last_name''<span>"Last Name"</span>''required'); 

This is where I get $client:
PHP Code:
'client' =>$this->registration_model->get_single_client($_SESSION['client_id']),   

And this is in my model:
PHP Code:
/*
* get a specific client
*/
 
public function get_single_client($client_id) {
 
 
$this->db->where('id'$client_id);
 
$query $this->db->get('clients');
 
 return 
$query->row();
 
 } 

Where in any of this code am I doing HTML escaping?
Reply


Messages In This Thread
RE: database INSERT and UPDATE converts symbols to html code - by webmachine - 03-11-2016, 07:35 AM



Theme © iAndrew 2016 - Forum software by © MyBB