Questions tagged as 'mvc'

1
answer

Treat session by codeigniter model or controller

I'm trying to send the data from the bank to the session, gave a print_r in the data received from the bank, but I can not pass it to the session, follow the code. Controller <?php defined('BASEPATH') OR exit('No direct script access all...
asked by 03.09.2015 / 00:15
1
answer

Form only works the second time

I made a form login and everything worked fine. But it has a bug, only log on the second attempt. It is in MVC pattern: Controller: public function index() { if(!$this->model->isUserLoggedIn()) { if(isset($_POST['lo...
asked by 25.06.2015 / 01:28
2
answers

MVC PHP - Libraries - Directory Structure

I have a question regarding the folder structure of the application. Next, the question arises when there is a need to write a class that integrates with an API that class would be allocated in which part? For example, this class would not...
asked by 30.04.2015 / 16:19
1
answer

Two forms on one page

Well, I have a view with two form and both have action="current_url()" , that is, the two will execute the action on the same page, the problem is that regardless of the button I click to send the form it always executes the two generating...
asked by 08.04.2015 / 21:46
1
answer

Passing value from one view to another view - PHP

Well, I need to pass a value from one View to another View, in this case an ID. For example: In the Main View I have a list of vacancies, when I click on one of the vacancies will load the second View where it will be possible to edit this va...
asked by 15.01.2015 / 14:22
1
answer

how to get an id of a model in a view through a link?

I have a link that calls a function JS (POPUP), in this popup I have a registration form, to validate all the parameters of my form, I need to obtain the ID of the My Model that is in the view of the Link I am not able to obtain this ID for inse...
asked by 23.12.2014 / 14:31
1
answer

How to create a set of tables in the database via PHP

I'm having trouble while creating the database automatically via PHP. I am developing a project in MVC from college and wanted to import the sql file and through a query create the tables. In the previous part of the code is made the connecti...
asked by 25.11.2014 / 12:21
1
answer

Model Layer with DAO classes

I work with an MVC application that can be considered large or at least average, since it involves hundreds of functionalities and more than 400 MySQL database tables. As an ORM tool we adopt Doctrine through dependency injection, and we choose...
asked by 06.11.2014 / 11:48
2
answers

How do I direct an Action to a view within a folder?

In my Controller UGController I have an Action named Cadastro that takes me to the View Cadastro.cshtml that is in the UG folder. That is: Controller: UGController Action: Cadastro() Link: /UG/Cadastro View: /UG/Cadastro.cshtml So norm...
asked by 22.07.2014 / 16:38
1
answer

CakePHP: Why is not the Model loading correctly?

Model: CategoriaBanner Controller: CategoriasBannersController One thing is making me sleepy: When trying to use create(); it gives an object error when trying to use what would be the corresponding Model: $this->CategoriaBanner-&g...
asked by 07.06.2014 / 16:10