save checkbox value in db
hi, i'm trying to save checkbox value in database, but it is not saving 1 value, always 0!! echo $this-Form-input('active', array('type' = 'checkbox', 'checked' = false)); in db active is type of enum with values '0', '1', default - 0 thanks in advance -- View this message in context: http://cakephp.1045679.n5.nabble.com/save-checkbox-value-in-db-tp5716490.html Sent from the CakePHP mailing list archive at Nabble.com. -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups CakePHP group. To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscr...@googlegroups.com. To post to this group, send email to cake-php@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php. For more options, visit https://groups.google.com/groups/opt_out.
Re: save checkbox value in db
that's news to me! it works now thanks -- View this message in context: http://cakephp.1045679.n5.nabble.com/Fails-to-save-checkbox-value-in-db-tp5716490p5716493.html Sent from the CakePHP mailing list archive at Nabble.com. -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups CakePHP group. To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscr...@googlegroups.com. To post to this group, send email to cake-php@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php. For more options, visit https://groups.google.com/groups/opt_out.
Re: not loading js and css !!!
1) LoadModule rewrite_module modules/mod_rewrite.so ? 2) and this? Directory / Options FollowSymLinks AllowOverride None Order deny,allow Deny from all /Directory 3)yes, i have them in those folders thanks -- View this message in context: http://cakephp.1045679.n5.nabble.com/not-loading-js-and-css-tp5716365p5716413.html Sent from the CakePHP mailing list archive at Nabble.com. -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups CakePHP group. To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscr...@googlegroups.com. To post to this group, send email to cake-php@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php. For more options, visit https://groups.google.com/groups/opt_out.
Re: not loading js and css !!!
how should i enabled url rewrite ? IfModule mod_rewrite.c RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^ index.php [L] /IfModule i have this in app/htaccess -- View this message in context: http://cakephp.1045679.n5.nabble.com/not-loading-js-and-css-tp5716365p5716375.html Sent from the CakePHP mailing list archive at Nabble.com. -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups CakePHP group. To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscr...@googlegroups.com. To post to this group, send email to cake-php@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php. For more options, visit https://groups.google.com/groups/opt_out.
Re: not loading js and css !!!
El Tello, i'm still getting those errors in firebug -- View this message in context: http://cakephp.1045679.n5.nabble.com/not-loading-js-and-css-tp5716365p5716380.html Sent from the CakePHP mailing list archive at Nabble.com. -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups CakePHP group. To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscr...@googlegroups.com. To post to this group, send email to cake-php@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php. For more options, visit https://groups.google.com/groups/opt_out.
Re: not loading js and css !!!
vineet, after adding the code it shows 500 Internal Server Error -- View this message in context: http://cakephp.1045679.n5.nabble.com/not-loading-js-and-css-tp5716365p5716381.html Sent from the CakePHP mailing list archive at Nabble.com. -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups CakePHP group. To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscr...@googlegroups.com. To post to this group, send email to cake-php@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php. For more options, visit https://groups.google.com/groups/opt_out.
Re: not loading js and css !!!
js and css files both located in those directory folders.. -- View this message in context: http://cakephp.1045679.n5.nabble.com/not-loading-js-and-css-tp5716365p5716383.html Sent from the CakePHP mailing list archive at Nabble.com. -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups CakePHP group. To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscr...@googlegroups.com. To post to this group, send email to cake-php@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php. For more options, visit https://groups.google.com/groups/opt_out.
Re: not loading js and css !!!
RewriteBase / this line redirects to http://localhost/xampp/ i guess there's another problem too and i can't understand what thanks for your replies -- View this message in context: http://cakephp.1045679.n5.nabble.com/not-loading-js-and-css-tp5716365p5716388.html Sent from the CakePHP mailing list archive at Nabble.com. -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups CakePHP group. To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscr...@googlegroups.com. To post to this group, send email to cake-php@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php. For more options, visit https://groups.google.com/groups/opt_out.
not loading js and css !!!
hello NetworkError: 404 Not Found - http://localhost/css/jquery-ui.css; NetworkError: 404 Not Found - http://localhost/js/jquery.validate.js; NetworkError: 404 Not Found - http://localhost/js/jquery-ui-1.10.3.custom.min.js; i included those files in default layout, but it doesn't load or have no access to webroot.. can you help? -- View this message in context: http://cakephp.1045679.n5.nabble.com/not-loading-js-and-css-tp5716365.html Sent from the CakePHP mailing list archive at Nabble.com. -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups CakePHP group. To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscr...@googlegroups.com. To post to this group, send email to cake-php@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php. For more options, visit https://groups.google.com/groups/opt_out.
Re: Can anyone help me with editing post_tags ???
i forgot the view Edit Topic ?php echo $this-Form-create('Topic', array('type' = 'file')); echo $this-Form-input('id', array( 'type'='hidden', 'value' = $topic['Topic']['id'] )); echo $this-Form-input('title', array( 'type' = 'text', 'error' = array('class' = 'error-message'), 'label' = 'Title', 'value' = $topic['Topic']['title'] )); echo $this-Form-input('description', array( 'type' = 'textarea', 'error' = array('class' = 'error-message'), 'label' = 'Description', 'value' = $topic['Topic']['description'] )); $topicTag=''; foreach($editTags as $editTag){ $topicTag.=$editTag['Tag']['title'].' '; } echo $this-Form-input('tags', array( 'type'='text', 'error' = array('class' = 'error-message'), 'label' = 'Tags', 'value' = $topicTag )); so can you help? :( -- View this message in context: http://cakephp.1045679.n5.nabble.com/Can-anyone-help-me-with-editing-post-tags-tp5715315p5715332.html Sent from the CakePHP mailing list archive at Nabble.com. -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups CakePHP group. To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscr...@googlegroups.com. To post to this group, send email to cake-php@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php. For more options, visit https://groups.google.com/groups/opt_out.
Can anyone help me with editing post_tags ???
-- View this message in context: http://cakephp.1045679.n5.nabble.com/Can-anyone-help-me-with-editing-post-tags-tp5715315.html Sent from the CakePHP mailing list archive at Nabble.com. -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups CakePHP group. To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscr...@googlegroups.com. To post to this group, send email to cake-php@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php. For more options, visit https://groups.google.com/groups/opt_out.
Re: Can anyone help me with editing post_tags ???
this is a part of code for adding topic with tags $save = $this-Topic-save($data['Topic']); if($save){ $tags = explode(',', $data['Topic']['tags']); foreach($tags as $tag){ $tag = strtolower(trim($tag)); if($tag){ $foundTag = $this-Tag-find( 'first', array( 'conditions' = array( 'Tag.title' = $tag ) ) ); if($foundTag){ $topicTags['TopicTag']['tagId'] = $foundTag['Tag']['id']; }else{ $this-Tag-create(); $savedtag = $this-Tag-save(array('Tag' = array('title' = $tag))); $topicTags['TopicTag']['tagId'] = $savedtag['Tag']['id']; } $topicTags['TopicTag']['topicId'] = $save['Topic']['id']; $this-TopicTag-create(); $this-TopicTag-save($topicTags); } } i have problems with editing,, have to find all tag id before editing and after editing, something like that, there's three tables topics, tags and topic_tags with topicId and tagId, sorry for bad explanation thanks -- View this message in context: http://cakephp.1045679.n5.nabble.com/Can-anyone-help-me-with-editing-post-tags-tp5715315p5715319.html Sent from the CakePHP mailing list archive at Nabble.com. -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups CakePHP group. To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscr...@googlegroups.com. To post to this group, send email to cake-php@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php. For more options, visit https://groups.google.com/groups/opt_out.
Re: Add items to category
I already solved it in another way Thanks anyway:) -- View this message in context: http://cakephp.1045679.n5.nabble.com/Add-items-to-category-tp5714898p5714939.html Sent from the CakePHP mailing list archive at Nabble.com. -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups CakePHP group. To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscr...@googlegroups.com. To post to this group, send email to cake-php@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Add items to category
hi I have two tables` items and categories /categories/ id title description /items/ id title description category_id and i want to create a function addItems, that will allow me to add items to categories, sounds too simple. Can anyone help? -- View this message in context: http://cakephp.1045679.n5.nabble.com/Add-items-to-category-tp5714898.html Sent from the CakePHP mailing list archive at Nabble.com. -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups CakePHP group. To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscr...@googlegroups.com. To post to this group, send email to cake-php@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Replace an element in array
Hello, I have two arrays $keyword= array() //actually this is a word, that you must guess letter by letter and for ($i = 0; $i count($keyword); $i++) { //make equal word and keys array length $keys[] = '*'; if my word is 'foobar' , keys array will show ** so i want to input a letter and if it exists in the word, to add and replace in $keys array. for instance, input 'o' *oo*** the code i tried $findme = $this-data['Word']['find']; $keyword = str_split($word[0]); for ($i = 0; $i count($keyword); $i++) { $keys[] = '*'; } $this-set('keys', $keys); if (in_array($findme, $keyword)) { $pos = strpos($word[0], $findme); $replace = str_replace($keys, $pos,$findme); $new_word = array_push($keyword, $findme); //searches a string in array $pos = strpos($word[0], $findme); $key[$pos] = $findme; //finds a character pos in string } actually it deals with php functions, that i don't get, will anyone help? sorry for bad explanation and code, i need this as soon as possible :) thanks -- View this message in context: http://cakephp.1045679.n5.nabble.com/Replace-an-element-in-array-tp5714737.html Sent from the CakePHP mailing list archive at Nabble.com. -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups CakePHP group. To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscr...@googlegroups.com. To post to this group, send email to cake-php@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Re: Problem with Pagination of search results
That's perfect! thanks again! -- View this message in context: http://cakephp.1045679.n5.nabble.com/Problem-with-Pagination-of-search-results-tp5714685p5714707.html Sent from the CakePHP mailing list archive at Nabble.com. -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups CakePHP group. To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscr...@googlegroups.com. To post to this group, send email to cake-php@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Re: Problem with Pagination of search results
I only had $this-Paginator-numbers() in view. I'll try to make it via GET.. but after knowing how to use with sessions :) Thanks for your reply ! -- View this message in context: http://cakephp.1045679.n5.nabble.com/Problem-with-Pagination-of-search-results-tp5714685p5714704.html Sent from the CakePHP mailing list archive at Nabble.com. -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups CakePHP group. To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscr...@googlegroups.com. To post to this group, send email to cake-php@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Paginate search results
Hi people. I'm new to cakephp and need your help. I have this search function in my UsersController, so there's a problem with search result pagination. The first page shows first five names properly, but next pages does not show anything. I need that this session save all my users, then check and basically read it in next pages. so how it should be? th error message *Undefined index: pageCount [CORE\Cake\View\Helper\PaginatorHelper.php, line 702]* and the public function search() { if (!empty($this - data)) { $keyword = $this - data['User']['search']; $this - Session - write('users', $keyword); if ($this - Session - check('users')) { $keyword = $this - Session - read('users'); } elseif (isset($keyword, $this - data['User']['search'])) { $this - paginate = array('conditions' = array('OR' = array(User.first_name LIKE = $keyword%, User.last_name LIKE = $keyword%)), 'limit' = 5); $this - set('users', $this - paginate('User')); } } pls helpp Thanks in advance :) -- View this message in context: http://cakephp.1045679.n5.nabble.com/Paginate-search-results-tp5714685.html Sent from the CakePHP mailing list archive at Nabble.com. -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups CakePHP group. To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscr...@googlegroups.com. To post to this group, send email to cake-php@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Re: Problem with Pagination of search results
I see nobody knows... -- View this message in context: http://cakephp.1045679.n5.nabble.com/Problem-with-Pagination-of-search-results-tp5714685p5714690.html Sent from the CakePHP mailing list archive at Nabble.com. -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups CakePHP group. To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscr...@googlegroups.com. To post to this group, send email to cake-php@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php?hl=en. For more options, visit https://groups.google.com/groups/opt_out.