Re: $this-Session-setFlash problem

2010-12-22 Thread Stephen
I've been having this issue for some time! Ahah, excellent

On 22 December 2010 07:09, sherzo shahrzad.azimi...@gmail.com wrote:


 Thank you guys! yes Im using 1.2 and after I removing echo I'm not
 having that 1!!! I spent hours last night to remove that 1


 Thanks
 Sherry
 --
 View this message in context:
 http://cakephp.1045679.n5.nabble.com/this-Session-setFlash-problem-tp3314357p3314653.html
 Sent from the CakePHP mailing list archive at Nabble.com.

 Check out the new CakePHP Questions site http://cakeqs.org and help others
 with their CakePHP related questions.

 You received this message because you are subscribed to the Google Groups
 CakePHP group.
 To post to this group, send email to cake-php@googlegroups.com
 To unsubscribe from this group, send email to
 cake-php+unsubscr...@googlegroups.comcake-php%2bunsubscr...@googlegroups.comFor
  more options, visit this group at
 http://groups.google.com/group/cake-php?hl=en




-- 
Kind Regards
 Stephen @ NinjaCoderMonkey

 www.ninjacodermonkey.co.uk

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
CakePHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: $this-Session-setFlash problem

2010-12-22 Thread euromark
if you think about it, a single 1 somewhere usually ALWAYS is some
echo of a boolean value
false = '' (empty string), true = '1'

echo $someBooleanReturnValue; // (here we go...)

On 22 Dez., 12:56, Stephen step...@ninjacodermonkey.co.uk wrote:
 I've been having this issue for some time! Ahah, excellent

 On 22 December 2010 07:09, sherzo shahrzad.azimi...@gmail.com wrote:











  Thank you guys! yes Im using 1.2 and after I removing echo I'm not
  having that 1!!! I spent hours last night to remove that 1

  Thanks
  Sherry
  --
  View this message in context:
 http://cakephp.1045679.n5.nabble.com/this-Session-setFlash-problem-tp...
  Sent from the CakePHP mailing list archive at Nabble.com.

  Check out the new CakePHP Questions sitehttp://cakeqs.organd help others
  with their CakePHP related questions.

  You received this message because you are subscribed to the Google Groups
  CakePHP group.
  To post to this group, send email to cake-php@googlegroups.com
  To unsubscribe from this group, send email to
  cake-php+unsubscr...@googlegroups.comcake-php%2bunsubscr...@googlegroups.c 
  omFor more options, visit this group at
 http://groups.google.com/group/cake-php?hl=en

 --
 Kind Regards
  Stephen @ NinjaCoderMonkey

  www.ninjacodermonkey.co.uk

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
CakePHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


$this-Session-setFlash problem

2010-12-21 Thread sherzo

Hi All

I have the following lines in my controller:
$this-Session-setFlash('blabla');
$this-redirect(array('action'='unsuccessful'));
exit();

and this part in my view:
if ($session-check('Message.flash')) {
 echo $session-flash();
}

but the result will be :
div id=flashMessage class=messageblabla/div1

I have that 1 extra in my view!!!
can anyone help me please!

Thanks
Sherry 
-- 
View this message in context: 
http://cakephp.19694.n2.nabble.com/this-Session-setFlash-problem-tp5856173p5856173.html
Sent from the CakePHP mailing list archive at Nabble.com.

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
CakePHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: $this-Session-setFlash problem

2010-12-21 Thread Ryan Schmidt

On Dec 21, 2010, at 18:51, sherzo wrote:

 I have the following lines in my controller:
 $this-Session-setFlash('blabla');
 $this-redirect(array('action'='unsuccessful'));
 exit();
 
 and this part in my view:
 if ($session-check('Message.flash')) {
 echo $session-flash();
 }
 
 but the result will be :
 div id=flashMessage class=messageblabla/div1
 
 I have that 1 extra in my view!!!


My layout has:

echo $this-Session-flash();

Not sure if that makes a difference (vs. your echo $session-flash();).

If not, then I suspect you have another echo somewhere else in your code that's 
printing that 1.



Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
CakePHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: $this-Session-setFlash problem

2010-12-21 Thread euromark
what version are u using?
sounds to me like you you use cake1.2 but this piece of code is
cake1.3 style

dont echo it in 1.2

$session-flash();

On 22 Dez., 02:02, Ryan Schmidt google-2...@ryandesign.com wrote:
 On Dec 21, 2010, at 18:51, sherzo wrote:

  I have the following lines in my controller:
  $this-Session-setFlash('blabla');
  $this-redirect(array('action'='unsuccessful'));
  exit();

  and this part in my view:
  if ($session-check('Message.flash')) {
      echo $session-flash();
  }

  but the result will be :
  div id=flashMessage class=messageblabla/div1

  I have that 1 extra in my view!!!

 My layout has:

 echo $this-Session-flash();

 Not sure if that makes a difference (vs. your echo $session-flash();).

 If not, then I suspect you have another echo somewhere else in your code 
 that's printing that 1.

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
CakePHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: $this-Session-setFlash problem

2010-12-21 Thread sherzo

Thank you guys! yes Im using 1.2 and after I removing echo I'm not
having that 1!!! I spent hours last night to remove that 1


Thanks
Sherry
-- 
View this message in context: 
http://cakephp.1045679.n5.nabble.com/this-Session-setFlash-problem-tp3314357p3314653.html
Sent from the CakePHP mailing list archive at Nabble.com.

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
CakePHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en