<?php

$user_languag=$this->session->userdata('language');

$this->lang->load('contact_form_'.$user_languag,$user_languag);

$form_attributes=array('id'=>'contact_form');

echo form_open('mypage/createpost',$form_attributes);
echo form_error('sender_name');
echo form_error('sender_message');


if(isset($message_not_sent)){

    echo '<h3>'.$message_not_sent.'</h3>';
}

$data_name=array(

    'name'=> 'sender_name',
'value'=>$this->lang->line('name_value'),
    'id'=>'sender_name'

);

$data_message=array(

    'name'=> 'sender_message',
    'value'=>$this->lang->line('message_value'),
    'id'=>'sender_message'

);
?>

<div id="contact_form">

    <select name="language">

        <?php if($user_languag==='english'){?>

        <option value="english">english</option>
        <option value="frence">frence</option>

        <?php } else{?>
        <option value="english">english</option>
        <option value="frence">frence</option>
        <?php } ?>
        </select>
    <h1 contact_us></h1>

    <table>

        <tr>
            <td id="name" ><?php echo $this->lang->line('name');?></td>
            <td><?php echo form_textarea($data_name);?></td>
        </tr>
        <tr>
            <td id="message" ><?php echo $this->lang->line('message');?></td>
            <td><?php echo form_textarea($data_message);?></td>
        </tr>

        <tr>
            <td></td>
            <td><?php echo form_submit('submit','send');?></td>
        </tr>

        </table>
    <div id="validation_errors"> </div>

    <?php echo form_close();?>

    </div>

    </table>






    </select>
</div>
