

   <head>

   <meta content="text/html; charset=utf-8" http-equiv="Content-Type">

   </head>

 <?php

if($qry != false)

{

    foreach ($qry->result() as $row) :

    $id=$row->id;

    $poll = $row->name;

    

    endforeach;



}





?>



   <div id="mws-container" class="clearfix">

            <div class="container">

            

            

            

                     <form enctype="multipart/form-data"  action="<?php echo base_url();?>index.php/polls/save_edite_poll/<?php echo $id?>" method="post" class="mws-form">



   <div class="mws-panel grid_4" style="width:98%">

                    <div class="mws-panel-header">

                    	<span class="mws-i-24 i-table-1">الاستفتاء >> تعديل</span>

                    </div>



                        

                        

                            <div class="mws-form-inline">

                            

                    		 

                    		 

                    		 



                    			<div class="mws-form-row">

                    				<label>السؤال</label>

                    				<div class="mws-form-item small">

                    				<input type="text" name="poll" value="<?php echo $poll?>"  class="mws-textinput" />

                        <?php   echo form_error('poll'); ?>



                    								</div>

                    			</div>

                    	  

                        <?php

                        

if($ans_qry!= false)

{

$x=0;

    foreach ($ans_qry as $r) :

    $x++;

        ?>

    



                    			<div class="mws-form-row">

                    				<label>الاجابه <?php echo $x;?></label>

                    				<div class="mws-form-item small">

                    				<input value="<?php echo $r->id;?>" type="hidden" name="ans_id<?php if($x>='2'){echo $x;}?>"  id="answer"  class="mws-textinput" />

										<input value="<?php echo $r->answer;?>" type="text" name="answer<?php if($x>='2'){echo $x;}?>"  id="answer"  class="mws-textinput" />

                                      <?php if($x>='2'){  echo form_error('answer'.$x);}else{echo form_error('answer');} ?>

                    				</div>

                    			</div>

                    			

   <?php    

    endforeach;



}





?>



                    			

                    			

                    			

              

                    			                    		

                    		



           </div>                 

                            

                        

                        

                        

                       

                     <div class="mws-button-row">

                    		

                    			<input type="submit" value="تعديل" class="mws-button orange" />

                    			

                    		</div>

                </div>

               



                </form>

                

                

                





  

  </div>













  

    