# |
Sep 12th 2009, 09:47 |
Rampage |
hey guys, i'm facing a little weird problem! my add/edit has a file upload field. in this field it shows the proper input name: data[XYZ][blah], but after i submit the form, xyz turns into 0, blah turns into 0. |
# |
Sep 12th 2009, 09:46 |
Dimatter |
ACTION needs a sec |
# |
Sep 12th 2009, 09:45 |
jrod |
i think its just a matter of your syntax being slightly off |
# |
Sep 12th 2009, 09:45 |
savant |
depending on how you want the structure |
# |
Sep 12th 2009, 09:45 |
Dimatter |
jrod: yes, but i might have F'ed up with the syntax |
# |
Sep 12th 2009, 09:45 |
savant |
or the following: $category['categories']['new_count'] = array($cat_w_n[0]['new_count']); |
# |
Sep 12th 2009, 09:44 |
jrod |
Dimatter: have you tried array_push? |
# |
Sep 12th 2009, 09:44 |
savant |
does that work? |
# |
Sep 12th 2009, 09:44 |
savant |
? |
# |
Sep 12th 2009, 09:44 |
savant |
$category['categories']['new_count'] = $cat_w_n[0]['new_count']; |
# |
Sep 12th 2009, 09:43 |
Dimatter |
http://pastie.org/614644 look , it does add it but not the way i want it to |
# |
Sep 12th 2009, 09:42 |
Dimatter |
okay sec |
# |
Sep 12th 2009, 09:41 |
savant |
that should only output the ones that are messing up |
# |
Sep 12th 2009, 09:41 |
Dimatter |
http://pastie.org/614640 |
# |
Sep 12th 2009, 09:41 |
savant |
just place one at the end of line 15 and one at the end of line 16 :) |
# |
Sep 12th 2009, 09:41 |
savant |
where did you add the debug statements? |
# |
Sep 12th 2009, 09:40 |
savant |
those are two different arrays completely |
# |
Sep 12th 2009, 09:40 |
Dimatter |
i see it being added but ... |
# |
Sep 12th 2009, 09:40 |
Dimatter |
http://pastie.org/614639 |
# |
Sep 12th 2009, 09:38 |
Dimatter |
okay |
# |
Sep 12th 2009, 09:38 |
savant |
humor me |
# |
Sep 12th 2009, 09:38 |
Dimatter |
and it's the same before |
# |
Sep 12th 2009, 09:38 |
Dimatter |
that's after |
# |
Sep 12th 2009, 09:38 |
Dimatter |
http://pastie.org/614635 |
# |
Sep 12th 2009, 09:38 |
savant |
and then bin the resulting arrays |
# |
Sep 12th 2009, 09:38 |
savant |
Dimatter: can you do debug($category) before AND after that statement? |
# |
Sep 12th 2009, 09:37 |
Dimatter |
why can't i add a new value to the array at line 16 http://pastie.org/614623 ??? |
# |
Sep 12th 2009, 09:37 |
Dimatter |
i did |
# |
Sep 12th 2009, 09:36 |
savant |
Dimatter: if you have a question, it'd be best to ask it :) |
# |
Sep 12th 2009, 09:34 |
savant |
lots of people |
# |
Sep 12th 2009, 09:32 |
Dimatter |
anyone alive ? |
# |
Sep 12th 2009, 09:29 |
Dimatter |
why can't i add a new value to the array at line 16 http://pastie.org/614623 ??? |
# |
Sep 12th 2009, 08:06 |
ADmad |
you should read the manual more often |
# |
Sep 12th 2009, 08:06 |
ADmad |
~tell charnel about book auth user |
# |
Sep 12th 2009, 08:05 |
ADmad |
there's no need to do that in the first place... the info is already there is session, so just use session helper in view/layout |
# |
Sep 12th 2009, 08:04 |
charnel |
ADmad : http://bin.cakephp.org/view/1759520629 here is the before filter of AppController |
# |
Sep 12th 2009, 08:03 |
ADmad |
same way you do for a view |
# |
Sep 12th 2009, 08:02 |
charnel |
how can I set a variable for the default.ctp? |
# |
Sep 12th 2009, 08:01 |
ADmad |
the latter |
# |
Sep 12th 2009, 07:59 |
charnel |
is it impossible or am I doing something wrong |
# |
Sep 12th 2009, 07:58 |
charnel |
I am setting a variable in app_controller.php but cannot access it in my page layout default.ctp |