Re: How to use value used in input tag in view

2006-07-22 Thread John Zimmerman [gmail]
Is your field name actually 'First_name' or is it 'first_name'?This might be part of the problem.When you sumit the form via 'post' your value should come in an array called $data in the controller. In the controller action you are submitting to insert the following code near the top and you can

Re: How to use value used in input tag in view

2006-07-22 Thread [EMAIL PROTECTED]
hi John, ya the field name is 'First_name' .when i use ur suggested code it gives undefined data varaible in my employees_controller file. Basicaly in my application follwoing file I created.. 1) view file is employees.thtml in c:\phpdev\www\cake\app\views\employees\ 2) controllrer

Modularize cakephp little bit different way ...

2006-07-22 Thread KingChris
Hi, I red all threads about plugins and tried spliceit, too.But I'm not happy with it or I'm to stupid to understand :o) In my solution I created some plugins, load it in a main controller by requestAction (render the view already) and set it in a global view in its places. Next step i

Re: Why my fav.ico does not work properly?

2006-07-22 Thread saavedrajj
thanks for all the replys, but it only works for FIrefox... I don't know the reason why on IE doesn't work. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to

Re: Get all controllers from application

2006-07-22 Thread Daniel Hofstetter
I posted a component for that task in my blog: http://cakebaker.wordpress.com/2006/07/21/how-to-list-all-controllers/ HTH -- Daniel Hofstetter http://cakebaker.wordpress.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the

Re: POSTDATA problem

2006-07-22 Thread KingChris
Use redirect($url); Example: $this-redirect('/blog/view'); Cya Chris; --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe

Re: Why my fav.ico does not work properly?

2006-07-22 Thread AD7six
Saavedrajj, Sanity check: Do _any_ sites have a favicon in your version of IE? Try this example: http://www.bbc.co.uk/ If you don't see a favicon in IE with that site (as I don't) you are chasing something you can't do ;) Cheers, AD7six PS. As JZ said in his 2nd reply: some/most versions of

Re: Why my fav.ico does not work properly?

2006-07-22 Thread AD7six
PPs. And only if it is in the root i.e. /favicon.ico. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group,

Re: AJAX Autocomplete silently failing

2006-07-22 Thread nate
The autocomplete=off setting disables the browser's built-in autocomplete functionality if it is active. Bingo, it looks like the case of your field name is off, I'm guessing it should actually be 'Author/last_name'. Also, anyone debugging autocomplete or other Ajax fields would do well to use

Re: Call to undefined function: mysql_real_escape_string()

2006-07-22 Thread nate
No. We originally had it using mysql_escape_string or mysql_real_escape_string depending on which was available, but after the version requirement was moved up to 4.3.2, we removed the references to mysql_escape_string because keeping it around was pointless.

Re: Why my fav.ico does not work properly?

2006-07-22 Thread RosSoft
the correct way to use favicon is: link rel=shortcut icon href=?php echo $this-webroot?favicon.ico type=image/x-icon / --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send

Re: How to use value used in input tag in view

2006-07-22 Thread ryanb006
Ensure your form is posting to the correct URL (i.e. the correct controller and action-- /employees/add for example). Did you insert the code that JZ suggested? This should be your add() function in employees_controller.php: function add() { if ( !empty($this-$data) ) {

Re: How to use value used in input tag in view

2006-07-22 Thread ryanb006
Just noticed this: 1) Your view file should be the same name as the function that renders it. (i.e. add.thtml) 2) You may have just mistyped it, but your controller should be employees_controller.php Your paths/folders were fine though. Ryan

Re: POSTDATA problem

2006-07-22 Thread milicic.marko
OK. When I use form method=POST in my views I should immediatly process post data and redirect user to same page but THIS TIME post data will be flushed :) Am I right. PS. CakePHP community is great. Keep rollin' :) --~--~-~--~~~---~--~~ You received this

checkbox, checked

2006-07-22 Thread [EMAIL PROTECTED]
i cannot set checkbox into state checked. $html-checkbox('User/ave', null, array('value'='1')); the above always renders as: input name=data[User][ave] value=0 id=UserAve type=hiddeninput name=data[User][ave] value=1 id=UserAve type=checkbox what am i doing wrong. have a nice, koo.

Re: Why my fav.ico does not work properly?

2006-07-22 Thread John Zimmerman [gmail]
In Internet Explorer 6 save the page to your favorites.Then navigate to another page (i.e. Google.com).Then click on the page you saved in your favorites.That brings it up 100% in Internet Explorer for me. Also, how did you create your favicon? Did you embed sizes other than 16x16?On 7/22/06,

website prototyping

2006-07-22 Thread codecowboy
Does anyone know of any open source software for building prototypes (screen shots) of your website. Something that would be useful for describing various UI possibilities. thank you --~--~-~--~~~---~--~~ You received this message because you are subscribed to

Re: How to use value used in input tag in view

2006-07-22 Thread John Zimmerman [gmail]
Also, I don't know if this is causing you a problem or not, but it would be a best practice to follow the Cake conventions (http://manual.cakephp.org/chapter/22) whenever it is practical to do so. The piece of code I am refering to most is the capitalization of First_name, both in the database and

Re: website prototyping

2006-07-22 Thread John Zimmerman [gmail]
If you are looking to generate some UI mockups you could use http://www.nvu.com/index.phpIf you are looking to do sort of a screencast type demo, Wink is not open source, but it is a very good free program. http://www.debugmode.com/wink/On 7/22/06, codecowboy [EMAIL PROTECTED] wrote:Does anyone

Re: AJAX Autocomplete silently failing

2006-07-22 Thread bingo
Hi Nate, I tried changing to Author/last_name...but it is not helping... I also tried firebug to determine error. But the debugger is not showing any error. Do you think the structure of library might affect. I am using following structure - app - webroot -js - prototype

Find conditions for HABTM

2006-07-22 Thread kitten
Hi :) I stumbled over a problem with HABTM association that seemed trivial at first but I could not find a real solution... I have a HABTM association between model User and model Submission. Each submission belongs to one or more users, each user can be associated with one or more submissions.

Re: checkbox, checked

2006-07-22 Thread RosSoft
in your action try: $this-data['User']['ave']=1; --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send

Re: website prototyping

2006-07-22 Thread codecowboy
Thank you that nvu is pretty nice. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL

Re: Bug: using multiple models in controller

2006-07-22 Thread invincible
i'm already running java. plain Debian doesn't have a multiverse (just contib non-free) You do have to run unstable (sid) but this is pretty stable on the supported platforms. The bug is still open. Maybe i'll ticket it. In the mean time i've fixed another bug and ticketed it.

Re: Bug: using multiple models in controller

2006-07-22 Thread invincible
Sun changed it's licence. CEO's orders to make it more linux friendly. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe

Re: How i can access to method of Object class on AppController ?

2006-07-22 Thread francky06l
Hi Sebastien, I come from Object too and it tooks a bit of time to get into cake (not so long actually), but once you got it then it;s quite easy .. Very helpull people here, and as you know, there is always someone had the same problem as you when starting.. Anyway, I think cake is great and

Correct procedure for db config switching?

2006-07-22 Thread Ixulai
Ok, the app I'm developing requires a way to dynamically create switch database configs at runtime. At present I am using a hack to create new datasources at runtime. (SVN copy has ConnectionManager::create for this purpose but for some reason 1.1.6.3264 doesn't have this, despite it being added

Re: Correct procedure for db config switching?

2006-07-22 Thread Samuel DeVore
I do it in my /config/databases.php file. so in the class definition I have a constructor (all my stuff is php4 so I do it this way) function DATABASE_CONFIG () { if ($_SERVER['SERVER_NAME'] == 'dns.of.demo.machine') { $this-default = $this-dev;

Re: Correct procedure for db config switching?

2006-07-22 Thread Gustavo Carreno
On 7/23/06, Samuel DeVore [EMAIL PROTECTED] wrote: Though I think that using the __constructor() that cake uses everywhere else for php4 and 5 uniformity should work as well. One should use both ways to define constructor and drop the code on the __construct, calling it from the PHP4 way:

Re: Correct procedure for db config switching?

2006-07-22 Thread Samuel DeVore
i's funny I just looked at an actual site of mine and I do ;) need to double check them all, thanks for the reminer...On 7/22/06, Gustavo Carreno [EMAIL PROTECTED] wrote:On 7/23/06, Samuel DeVore [EMAIL PROTECTED] wrote: Though I think that using the __constructor() that cake uses everywhere

Re: Correct procedure for db config switching?

2006-07-22 Thread Ixulai
Samuel DeVore wrote: I do it in my /config/databases.php file. Not a bad solution but unfortunately it won't work for my app. The dynamic configs are created from data pulled from another database. This means I need to be at a stage where I can connect to the 'default' config before I can use

Re: more than one kind of relationship between the same two tables?

2006-07-22 Thread calzone
I've been trying this and it's not working, but its not failing either. Here's the rub: I need to access the value of character.name that corresponds to primary_character_id for the member that corresponds to the current character. So let's say William Shattner is a member, and Captain Kirk is

Re: more than one kind of relationship between the same two tables?

2006-07-22 Thread gwoo
try pr($char['PrimaryCharacter']); --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to

Re: more than one kind of relationship between the same two tables?

2006-07-22 Thread calzone
I get Notice: Undefined index: --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL

Re: more than one kind of relationship between the same two tables?

2006-07-22 Thread calzone
I'm curious, just how does cake know which model the foreign key in question is pointing to? Looking at this: var $hasOne = array('PrimaryCharacter' = array('className' ='Member', 'foreignKey' = 'primary_member_id')); I don't see anywhere where I'm telling cake that the model I'm associating

Re: more than one kind of relationship between the same two tables?

2006-07-22 Thread calzone
For a while I thought I was answering my own question, when I noticed that the above was slightly wrong. I believe it should be: var $hasOne = array('PrimaryCharacter' = array('className' ='Character', 'foreignKey' =

Re: more than one kind of relationship between the same two tables?

2006-07-22 Thread calzone
Lol, ok... thanks to all who helped... you pointed me in the right directions and I only had to make one small modification: instead of using hasOne, I used belongsTo and voila, worked like clockwork! Thank you so much! --~--~-~--~~~---~--~~ You received this