Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4086756
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T18:46:06+00:00 2026-05-20T18:46:06+00:00

I follow the MVC model in PHP + JS + HTML + CSS Also,

  • 0

I follow the MVC model in PHP + JS + HTML + CSS
Also, i use CodeIgniter as framework.

I want to know, what do i need to do to redirect to another controller. I am in the Home page of my project.. and when i click “details” (div = prod_details) for a product, what is supposed to be the reference.

For Help, here’s my code

MY HOME controller

class ordiDepot extends Controller {
function ordiDepot(){
    parent::Controller();
}
function index(){


    $data['base'] = $this->config->item('base_url');
    $data['css'] = $this->config->item('chemin').'views/style.css';
    $data['image'] = $this->config->item('chemin').'views/images';
    $data['js'] = $this->config->item('chemin').'views/boxOver.js';
    $data['abs'] = 'ordiDepot/accueil';
    $this->load->view('ordiDepotH',$data);
    $this->load->view('ordiDepotB',$data);
    $this->load->view('ordiDepotF',$data);

    }

    function accueil($page){
    $data['details_page'] = $this->config->item($page);
    $data['css'] = $this->config->item('chemin').'views/style.css';
    $this->load->view('details.php',$data);

            }
    }

My VIEW

<div class="left_content">
<div class="title_box">Pieces</div>

    <ul class="left_menu">
        <li class="odd"><a href="services.html">Processeurs</a></li>
        <li class="even"><a href="services.html">Carte Mere</a></li>
        <li class="odd"><a href="services.html">Carte Video</a></li>
        <li class="even"><a href="services.html">Carte Reseau</a></li>
        <li class="odd"><a href="services.html">Bloc d'alimentation</a></li>
        <li class="even"><a href="services.html">Disque dur</a></li>
        <li class="odd"><a href="services.html">Boitiers</a></li>
    </ul> 


 <div class="title_box">Produit en special</div>  
 <div class="border_box">
     <div class="product_title"><a href="details.html">Motorola 156 MX-VL</a></div>
     <div class="product_img"><a href="details.html"><img src= <?php echo $image?>/laptop.png alt="" title="" border="0" /></a></div>
     <div class="prod_price"><span class="reduce">350$</span> <span class="price">270$</span></div>
 </div>  

THANKS TO ALL

 <div class="banner_adds">

 <a href="#"><img src="images/bann2.jpg" alt="" title="" border="0" /></a>
 </div>    

Nouveaux produits

    <div class="prod_box">
        <div class="top_prod_box"></div>
        <div class="center_prod_box">            
             <div class="product_title"><a href="details.html">Motorola 156 MX-VL</a></div>
             <div class="product_img"><a href="details.html"><img src=<?php echo $image?>/laptop.gif alt="" title="" border="0" /></a></div>
             <div class="prod_price"><span class="reduce">350$</span> <span class="price">270$</span></div>                        
        </div>
        <div class="bottom_prod_box"></div>             
        <div class="prod_details_tab">
        <a href="#" title="header=[Add to cart] body=[&nbsp;] fade=[on]"><img src="<?php echo $image;?>/cart.gif" alt="" title="" border="0" class="left_bt" /></a>

        <a href="details.php" class="prod_details">details</a>            
        </div>                     
    </div>



    <div class="prod_box">
        <div class="top_prod_box"></div>
        <div class="center_prod_box">            
             <div class="product_title"><a href="details.html">Ipod</a></div>
             <div class="product_img"><a href="details.html"><img src= <?php echo $image?>/p4.gif alt="" title="" border="0" /></a></div>
             <div class="prod_price"><span class="price">270$</span></div>                        
        </div>
        <div class="bottom_prod_box"></div>             
        <div class="prod_details_tab">
        <a href="#" title="header=[Ajouter panier] body=[&nbsp;] fade=[on]"><img src="<?php echo $image;?>/cart.gif" alt="" title="" border="0" class="left_bt" /></a>

        <a href="details.html" class="prod_details">details</a>             
        </div>                     
    </div>

    <div class="prod_box">
        <div class="top_prod_box"></div>
        <div class="center_prod_box">            
             <div class="product_title"><a href="details.html">Webcam Samsung</a></div>
             <div class="product_img"><a href="details.html"><img src=<?php echo $image?>/p5.gif alt="" title="" border="0" /></a></div>
             <div class="prod_price"><span class="reduce">350$</span> <span class="price">270$</span></div>                        
        </div>
        <div class="bottom_prod_box"></div>             
        <div class="prod_details_tab">
        <a href="#" title="header=[Ajouter panier] body=[&nbsp;] fade=[on]"><img src="<?php echo $image;?>/cart.gif" alt="" title="" border="0" class="left_bt" /></a>

        <a href="details.html" class="prod_details">details</a>            
        </div>                     
    </div> 

    <div class="prod_box">
        <div class="top_prod_box"></div>
        <div class="center_prod_box">            
             <div class="product_title"><a href="<?php echo $abs;?>/details">Motorola 156 MX-VL</a></div>
             <div class="product_img"><a href="details.html"><img src=<?php echo $image?>/laptop.gif alt="" title="" border="0" /></a></div>
             <div class="prod_price"><span class="reduce">350$</span> <span class="price">270$</span></div>                        
        </div>
        <div class="bottom_prod_box"></div>             
        <div class="prod_details_tab">
        <a href="#" title="header=[Ajouter panier] body=[&nbsp;] fade=[on]"><img src="<?php echo $image;?>/cart.gif" alt="" title="" border="0" class="left_bt" /></a>

        <a href="details.html" class="prod_details">details</a>            
        </div>                     
    </div>



    <div class="prod_box">
        <div class="top_prod_box"></div>
        <div class="center_prod_box">            
             <div class="product_title"><a href="details.html">Iphone</a></div>
             <div class="product_img"><a href="details.html"><img src=<?php echo $image?>/p4.gif alt="" title="" border="0" /></a></div>
             <div class="prod_price"><span class="price">270$</span></div>                        
        </div>
        <div class="bottom_prod_box"></div>             
        <div class="prod_details_tab">
        <a href="#" title="header=[Ajouter panier] body=[&nbsp;] fade=[on]"><img src=<?php echo $image;?>/cart.gif alt="" title="" border="0" class="left_bt" /></a>

        <a href="details.html" class="prod_details">details</a>             
        </div>                     
    </div>

    <div class="prod_box">
        <div class="top_prod_box"></div>
        <div class="center_prod_box">            
             <div class="product_title"><a href="details.html">Webcam Samsung</a></div>
             <div class="product_img"><a href="details.html"><img src=<?php echo $image?>/p5.gif alt="" title="" border="0" /></a></div>
             <div class="prod_price"><span class="reduce">350$</span> <span class="price">270$</span></div>                        
        </div>
        <div class="bottom_prod_box"></div>             
        <div class="prod_details_tab">
        <a href="#" title="header=[Ajouter panier] body=[&nbsp;] fade=[on]"><img src= <?php echo $image;?>/cart.gif alt="" title="" border="0" class="left_bt" /></a>

        <a href="details.html" class="prod_details">details</a>            
        </div>                     
    </div> 

Accessoires

    <div class="prod_box">
        <div class="top_prod_box"></div>
        <div class="center_prod_box">            
             <div class="product_title"><a href="details.html">Motorola 156 MX-VL</a></div>
             <div class="product_img"><a href="details.html"><img src= <?php echo $image?>/laptop.gif alt="" title="" border="0" /></a></div>
             <div class="prod_price"><span class="reduce">350$</span> <span class="price">270$</span></div>                        
        </div>
        <div class="bottom_prod_box"></div>             
        <div class="prod_details_tab">
        <a href="#" title="header=[Ajouter panier] body=[&nbsp;] fade=[on]"><img src="<?php echo $image;?>/cart.gif" alt="" title="" border="0" class="left_bt" /></a>

        <a href="details.html" class="prod_details">details</a>            
        </div>                     
    </div>



    <div class="prod_box">
        <div class="top_prod_box"></div>
        <div class="center_prod_box">            
             <div class="product_title"><a href="details.html">Iphone</a></div>
             <div class="product_img"><a href="details.html"><img src=<?php echo $image?>/p4.gif alt="" title="" border="0" /></a></div>
             <div class="prod_price"><span class="price">270$</span></div>                        
        </div>
        <div class="bottom_prod_box"></div>             
        <div class="prod_details_tab">
        <a href="#" title="header=[Ajouter panier] body=[&nbsp;] fade=[on]"><img src="<?php echo $image;?>/cart.gif" alt="" title="" border="0" class="left_bt" /></a>

        <a href="details.html" class="prod_details">details</a>             
        </div>                     
    </div>

    <div class="prod_box">
        <div class="top_prod_box"></div>
        <div class="center_prod_box">            
             <div class="product_title"><a href="details.html">Webcam Samsung</a></div>
             <div class="product_img"><a href="details.html"><img src= <?php echo $image?>/p5.gif alt="" title="" border="0" /></a></div>
             <div class="prod_price"><span class="reduce">350$</span> <span class="price">270$</span></div>                        
        </div>
        <div class="bottom_prod_box"></div>             
        <div class="prod_details_tab">
        <a href="#" title="header=[Ajouter panier body=[&nbsp;] fade=[on]"><img src= <?php echo $image;?>/cart.gif alt="" title="" border="0" class="left_bt" /></a>

        <a href="details.html" class="prod_details">details</a>            
        </div>                     
    </div> 

Shopping cart

        <div class="cart_details">
        3 items <br />
        <span class="border_cart"></span>
        Total: <span class="price">350$</span>
        </div>

        <div class="cart_icon"><a href="#" title="header=[Au panier] body=[&nbsp;] fade=[on]"><img src= <?php echo $image;?>/shoppingcart.png alt="" title="" width="48" height="48" border="0" /></a></div>

    </div>


 <div class="title_box">Nouveaux</div>  
 <div class="border_box">
     <div class="product_title"><a href="details.html">Motorola 156 MX-VL</a></div>
     <div class="product_img"><a href="details.html"><img src= <?php                           echo          $image?>/p2.gif alt="" title="" border="0" /></a></div>
     <div class="prod_price"><span class="reduce">350$</span> <span class="price">270$</span></div>
 </div>  



<div class="title_box">Logiciels</div>

    <ul class="left_menu">
        <li class="odd"><a href="services.html">Jeux</a></li>
        <li class="even"><a href="services.html">Utilitaires</a></li>
        <li class="odd"><a href="services.html">OS</a></li>
    </ul>      

 <div class="banner_adds">

 <a href="#"><img src=<?php echo $image?>/bann1.jpg alt="" title="" border="0" /></a>
 </div>        

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T18:46:07+00:00Added an answer on May 20, 2026 at 6:46 pm

    Well to redirect to another controller you just put that controllers URL path as the href of the anchor.

    <a href="/controller/action"></a>
    

    Example for a product description page:

    <a href="/products/item/324235">Product</a>
    

    Where 324235 is any given product number that needs to be injected into the href from your server side code.

    Sorry I didn’t look right through your code, so your controller and action names may be different.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am working with an MVC framework (specifically, PHP's CodeIgniter ). I am trying
I want to follow MVC for my current project, in which 7-8 UIViewController subclasses
so i want to follow the mvc conventions but haven't really got the hang
I am trying to follow this example: Creating Model Classes with the Entity Framework
I've got an editor template which renders out a checkbox: @Html.CheckBoxFor(model => model.Follow) Which
I have decided to use ASP.NET MVC for a website project and want to
I'm follow this tutorial to use CAPTCHA in MVC application: http://coderjournal.com/2008/03/actionfilterattribute-aspnet-mvc-captcha/ I think this
Is there any order or pattern that action parameters in an MVC controller follow.
I'm trying to follow this tutorial using StructureMap : http://iridescence.no/post/Constructor-Injection-for-ASPNET-MVC-Action-Filters.aspx What I'm trying to
I am quite new with Linq to SQL and MVC but I follow the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.