Re: $this->redirect not working

2014-09-07 Thread Techinfocomp.com
Thanks Friends, It's Resolved.

There was a whitespace in my some model. As soon as i removed, it start 
working again.
Thanks a lot. Now i have an experience with this kind of error. 


On Sunday, March 11, 2012 7:24:30 AM UTC+5:30, Brian Bowler wrote:
>
> So I have this function where the user can add the weight to materials and 
> save them. However after the updateAll, $this->redirect doesn't work at all 
> and the result shows up with a blank page with nothing in the source. In an 
> ideal world I would have it redirect to a different page but at a minimum I 
> would like it to go back to the page where they entered in the weights. 
>   
>   public function instructions($id = null) {
> $instructions = $this->Formula->findFormula($id);
> $count = count($instructions);
> $this->set(array('instructions' => $instructions, 'count' => 
> $count, 'formulaId' => $id));
> if(!empty($this->data)) {
> $count = count($this->request->data);
> for($i = 0; $i <= $count; $i++) {
> $this->Formula->updateAll(
> array('Formula.weight' => 
> $this->request->data['Formula'][$i]['weight']),
> array('Formula.id' => 
> $this->request->data['Formula'][$i]['id'])
> );
> }
> }
> $this->redirect(array('controller' => 'instructions', 'action' => 
> 'instructions', $id));
> }
>
> I have no idea what causes this. Any help is much appreciated, even if its 
> just telling me where in the manual to read up on it. 
>

-- 
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/d/optout.


Re: Make select from MYSQL set

2014-09-07 Thread Abdelmajid el Ibrahimi
I checked the book and there wasnt a solution that was ready to use. I
hoped to have a easy form helper everything is very easy in cakephp so i
hoped that this would to. And believe me i read a lot i just begin and i
only ask if i didnt find anything after  a day of searching. I am new to
the mvc and oop framework. I used to do procedural programming. So if I ask
something you can be sure I looked in the api in the book on Google
stackoverflow etc.
Op 7 sep. 2014 08:49 schreef "José Lorenzo" :

> Well, you would do exactly the same thing in CakePHP. Have you checked the
> book? http://book.cakephp.org/2.0/en/index.html
>
> It is a good resource if you are starting with the framework and need to
> do the basic stuff.
>
> On Saturday, September 6, 2014 9:55:09 PM UTC+2, Abdelmajid el Ibrahimi
> wrote:
>>
>> I just query it and then put it in a result and then a while loop and
>> then generate my select.
>>
>> Met vriendelijke groet,
>> A. el Ibrahimi
>> Op 6 sep. 2014 21:44 schreef "José Lorenzo" :
>>
>>> How would you select from a SET column without cake?
>>>
>>> On Saturday, September 6, 2014 6:31:42 PM UTC+2, Abdelmajid el Ibrahimi
>>> wrote:

 Can i make a easy select from the SET fields in mysql or do i need to
 write a function to get them.
 CakePHP 3

>>>  --
>>> 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 a topic in the
>>> Google Groups "CakePHP" group.
>>> To unsubscribe from this topic, visit https://groups.google.com/d/
>>> topic/cake-php/DxMd4FZWNuA/unsubscribe.
>>> To unsubscribe from this group and all its topics, 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/d/optout.
>>>
>>  --
> 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 a topic in the
> Google Groups "CakePHP" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/cake-php/DxMd4FZWNuA/unsubscribe.
> To unsubscribe from this group and all its topics, 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/d/optout.
>

-- 
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/d/optout.


Re: $this->redirect not working

2014-09-07 Thread vinit sahasrabudhe
First delete all the temp files from /app/tmp/cache and /app/tmp/persistent
folders if you have created any new fields in database table. Secondly turn
on the debug mode in core.php file and then try again.

Thanks.
Vinit Sahasrabudhe
On 07-Sep-2014 8:07 AM, "Techinfocomp"  wrote:

> I did that but still i am getting the blank page while redirecting eg:
> $this->redirect('/admin_cms_travels');
> I am using CakePHP 2.5.4
>
> Any suggestion ?
>
>
> On Sunday, September 7, 2014 7:49:02 AM UTC+5:30, euromark wrote:
>>
>> Because it is unnecessary and can easily result in avoidable whitespace
>> errors.
>>
>> Am Sonntag, 7. September 2014 04:18:06 UTC+2 schrieb Techinfocomp:
>>>
>>> Why we not suppose to include closing TAG (?>)  "make sure all php files
>>> do not have closing ?>" ?
>>>
>>>
>>> On Monday, June 3, 2013 9:06:03 AM UTC+5:30, Cheng Ka Teng wrote:

 if there is NO redirect at all you probably echo sth too soon and
 therefore headers are already sent and your redirect cannot work anymore .
 Please check the files inside app/controller, make sure all php files do
 not have closing ?>

 On Sunday, March 11, 2012 9:54:30 AM UTC+8, Brian Bowler wrote:
>
> So I have this function where the user can add the weight to materials
> and save them. However after the updateAll, $this->redirect doesn't work 
> at
> all and the result shows up with a blank page with nothing in the source.
> In an ideal world I would have it redirect to a different page but at a
> minimum I would like it to go back to the page where they entered in the
> weights.
>
>   public function instructions($id = null) {
> $instructions = $this->Formula->findFormula($id);
> $count = count($instructions);
> $this->set(array('instructions' => $instructions, 'count' =>
> $count, 'formulaId' => $id));
> if(!empty($this->data)) {
> $count = count($this->request->data);
> for($i = 0; $i <= $count; $i++) {
> $this->Formula->updateAll(
> array('Formula.weight' =>
> $this->request->data['Formula'][$i]['weight']),
> array('Formula.id' =>
> $this->request->data['Formula'][$i]['id'])
> );
> }
> }
> $this->redirect(array('controller' => 'instructions',
> 'action' => 'instructions', $id));
> }
>
> I have no idea what causes this. Any help is much appreciated, even if
> its just telling me where in the manual to read up on it.
>
  --
> 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/d/optout.
>

-- 
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/d/optout.