thanks for advance , this is my first time to use codeigniter to make a web site. My problem is as follow :

My view file contains :

<label class="control-label ">Insert Number of photos : </label>
<?php echo form_open('project_controller/no_of_pics'); ?>
<input name="no_pics" placeholder="Insert a number" type="text" value="<?php echo set_value('no_pics'); ?>" >
<input type='submit' name='submit' value='Insert' /> 
<?php echo form_close() ?>
<?php  $no_pic=''; ?>
<?php echo $no_pic; ?>

My controller file contains:

public function no_of_pics(){

      $hoho = array('no_pic' =>  $number  );


and i wrote that line the .htaccess file :

$route['project_controller/no_of_pics'] = "/project_controller/no_of_pics";

my problem is that i can't get the no_pics back to the view , it is supposed to check the number through validation rules in the controller but i want firstly to get the number back to the view file

when i wrote the code above i get the number back but in a plain page of the view file without any styling and in the top the number i inserted in the input form not even where i want to use.

can someone help me ?!

Related posts

Recent Viewed