cakephp

how can i request a variable in my home.ctp of my cakePHP application?

I created a page using the MVC structure called 'sections' ( view is located in the app/views/sections folder, model in the model folder and the controller in the controller folder) when i request the variable $test, it works fine without any errors.. When i want to request this variable in my home.ctp, it provides me with an error, sa...

How do i put this data in my DB?

Hello, i have an array in $this->data that looks like this: Array ( [Boeking] => Array ( [start] => 25/12/2010 [end] => 26/12/2010 [centrum] => Brussels [responsible] => Wouter [email] => [email protected] [materials] => Array ( ...

one variable and multiple controllers..

I'm working on a web application, using the CAKEPHP framework. Herefor i need to request one variable on multiple pages (all pages have different controllers). it is oubvious that i get a error on several pages, since the variable isn't declared in all the different controllers. Is there a workaround for this? i've already tried the ap...

Where is the appropriate place to define inflector rules in CakePHP 1.3?

In CakePHP 1.2, custom inflector rules could be defined in a file app/config/inflections.php. This file was removed in CakePHP 1.3. Instead, the documentation prescribes using the Inflector::rules function to load custom inflections. There's adequate documentation of how to define the custom inflections themselves, but the documentation...

two independent dropdowns with xml binded data - cakephp - best method?

What's best method within cakephp site for- two dropdowns one listing cds, one listing artists on select of either cd or artist I need my additional text to appear below dropdowns I have been searching through tutorials and manual - with no success. I am looking to learn by basic example - from form/view and controller. latest try...

How to combine Translate and Soft Deletable Behavior in CakePHP 1.2.7?

Hi guys, i'm trying to combine Translate Behavior and Mariano Iglesias' Soft Deletable Behavior Revision 49. But always if a want to soft delete a record which hasMany other records, which are translated (located in the i18n-table partly), the related hasMany records aren't soft deleted. Example: Post hasMany Comments (dependent = tr...

Creating meaningful add URLs in Cakephp

Hi there, For my site I have a number of Orders each of which contains a number of Quotes. A quote is always tied to an individual order, so in the quotes controller I add a quote with reference to it's order: function add($orderId) { // funtion here } And the calling URL looks a bit like http://www.example.com/quotes/add/1 It...

Load a controller into an other controller in cakephp

im developing a web application, using multiple pages, each with their own controller. The problem now is that there are some variables in a controller, created for one page, that are required for an other page ( with a different controller). Therefor i need to load one controller into the other one. I did this by adding App::impor...

CakePHP 1.3 controller save() does not save data

I want to add a new user to the database, and do so by making them fill in a form and submitting this. All seems to work fine. Just before my save() call in the controller I return all data and all necessary data is there. It is valid(ated), since no errors are returned. But then nothing happens. I'm being returned to my form without a...

Is there a better way to change user password in cakephp using Auth?

Hi, I am learning cakephp by myself. I tried to create a user controller with a changepassword function. It works, but I am not sure if this is the best way, and I could not googled up useful tutorials on this. Here is my code: class UsersController extends AppController { var $name = 'Users'; function login() { } fun...

CakePHP sending multiple lines of same cookie information in response header. why??

Hi all, I am having this problem with one of my cakePHP applications. My application displays a big html table on the page. I noticed that when the table goes beyond a certain size limit, IE cannot display that page. While trying to figure out why this happens, I noticed that my html response header contains a HUGE number of lin...

'Previous' Button in HTML/PHP

Hi there, I thought hours about that problem but I didn't come to any conclusion. My problem here is that I need a 'Previous' Button added to a form. The user should fill out a formular that is splitted up in 13 parts. Every part is an own formular having a 'Next' button for submitting everything to a database and redirecting to the nex...

how to save image in cakephp

Hi sir, I need to upload image in table as well as in folder.please help me ,how i will save image in folder and database. please describe the method. Thanks Manish ...

two databases in one controller cakePHP

I'm having trouble creating a page, which requires two different databases.. The controller is automaticly set to 'DB2', which is also specified in the database config file. When i add a var $uses = array ('groups') to the controller, which is from the other DB (DB1), i get the data from only DB2 and all requests to DB1 become a inval...

Cakephp Request data from other controller

Is it possible to request data from an other controller in cakePHP? For example, i created 2 folders in pages called search and update (both with a index.ctp) and a controller and model in the correct folders. Both pages are using a different db source, and i wnat to display some data from the search controller into the view of the upd...

Can I insert a style tag and contents from a view with CakePHP?

From what I can see, CakePHP makes it easy to link to a CSS file in a view with the following: echo $html->css('my-css-filename',null,array(),FALSE); But what if I don't want to exclusively use hardcoded files? How can I get it to create a style tag with some dynamically generated rules in e.g. <style type="text/css" media="all">p {f...

SQL SELECT using in() but excluding others.

I have a table called 'countries' linked to another table 'networks' with a many to many relationship: countries countries_networks networks +-------------+----------+ +-------------+----------+ +-------------+---------------+ | Field | Type | | Field | Type | | Field | Type ...

Creating non-framework classes in CakePHP

I'm making a tournament manager in CakePHP 1.3 and I have a tournament controller which is fine but I want to implement a interface that can be used to define how a tournament runs. the controller needs to load a concrete class that implements the TournamentStyle interface that defines how the tournament works. At the end of a round the...

purpose of 3rd party mvc ?

ive seen many third party mvcs or frameworks such as codeignitor , cakephp, and so on. what i want to know is what are their purposes? ive created my own framework call it an mvc or framework (in my opinion their all the same). in my framework i have all the classes in one folder called classes and all functions in another. its all organ...

Upload image in folder in cakephp

Hello sir, I want to upload image in particular folder,may be this be in webroot/img. how i have to do this,if any one have code please help with proper explanation. Thanks Manish ...