Re: a couple of small things I can't figure out

2008-05-03 Thread damo
just got around the problem by using a hidden field in the form echo $form->hidden('student_id', array('label' => 'Student Number:', 'size'=>5, 'value'=>$student)); works a treat now. But still haven't figured out the flash... --~--~-~--~~~---~--~~ You receive

Re: change password

2008-05-03 Thread damo
($this->data['User']['password_confirm'])) > unset($this->data['User']['password_confirm']); > if (isset($this->data['User']['old_password'])) > unset

Re: a couple of small things I can't figure out

2008-05-03 Thread damo
b logica, have taken your advise and renamed the field as you wisely suggested. I'm still perplexed as to why this saves the files, but with nothing in the $student_id: function add($student = null) { if (!empty($this->data) && is_uploaded_file($this->data['Myfile'][

change password

2008-05-02 Thread damo
=.' line. Here is the code I am trying. Let me know if there is a better way to do this in Cake 2. Cheers, Damo function changepassword() { if (!empty($this->data)) { $user = $this->Session->read('User'); $this->User->id = $use

Re: a couple of small things I can't figure out

2008-04-25 Thread damo
Hi Simon, this is what I have put in: view: create('Result');?> Subject Student Number Quiz Result "; echo ""; echo $form->input("Result.{$i}.subject", array('label' => '')); echo ""; echo ""; echo $form->input("Result.{$i}.student", array('label' =>

Re: a couple of small things I can't figure out

2008-04-25 Thread damo
thanks again b logica. Have tried what you have suggested with no luck. What I am passing is just an integer. I am passing this integer to the function so I know which student the file is for. I just had a thought that it might be easier to just pass the variable in the controller rather than

Re: a couple of small things I can't figure out

2008-04-21 Thread damo
thanks b logica, it still doesn't seem to work. Let me just clarify what I am trying to do. >From the view of the individual student, which uses the $student variable, I try to add a file. So the $student is passed to the function so that we know which student the file relates to. So in my tabl

Re: a couple of small things I can't figure out

2008-04-21 Thread damo
mmm, how do I post code to format better in Google Groups?? --~--~-~--~~~---~--~~ 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 grou

Re: a couple of small things I can't figure out

2008-04-21 Thread damo
that's what I figured it would be, but it doesn't seem to work, just takes me to the page without the variable at the end. Here is whole function. I'm also having a problem with one of the lines of code (highlighted below), as it stops it from saving the file all together function add($

Re: a couple of small things I can't figure out

2008-04-21 Thread damo
and one other I've got the upload controller working well, except where I try to do something myself function add($student = null) { if (!empty($this->data) && is_uploaded_file($this->data['Myfile']['File'] ['tmp_name'])) { $fileData = fread(fopen(

Re: a couple of small things I can't figure out

2008-04-20 Thread damo
thanks again for all your help!! one more stupid question: how do I use redirect or flash to go to a URL containing a variable eg: $this->flash('The file has been uploaded.','/students/view/$student', $pause='2'); can't seem to get the syntax correct... tried about a million different ways, but

a couple of small things I can't figure out

2008-04-19 Thread damo
s using a single form. Is this the best way of doing it, or has something easier been developed that I cannot find: https://trac.cakephp.org/ticket/3044 --- Thanks for all the help given by everyone so far, my project has really come together. Give me another 6 months, and I mi

Re: single view for multiple controllers

2008-04-16 Thread damo
r simple use, if you just have > these two actions to be rendered in the same view, easier way will be > better in my mind. > > On Apr 16, 2:19 am, grigri <[EMAIL PROTECTED]> wrote: > > > function viewx() { > > $this->set('students', ...); > >

single view for multiple controllers

2008-04-15 Thread damo
uot;Active" ))); } function viewx() { $this->set('students', $this->Student- >findAll(array( 'Student.status' => "Active", 'Student.state' != "X"))); }

Re: form issue

2008-03-28 Thread damo
$this->set('students', $this->Student->findAll()); } finally the viewsome view $number"; echo "$name"; echo "$course"; } I think that once I have this figured out, I will be able to manipulate it

upload an image to a directory

2008-03-25 Thread damo
he student record. It would also be handy to know how to delete this image from the edit view as well. I'm using the following to display images, it doesn't use any of the cakePHP goodness, so if there is some better way - I would love to hear it! 

Re: form issue

2008-03-23 Thread damo
I'm really getting somewhere! Albeit with my hand held :) On Mar 23, 5:16 pm, "Dardo Sordi Bogado" <[EMAIL PROTECTED]> wrote: > On Sun, Mar 23, 2008 at 3:00 AM, damo <[EMAIL PROTECTED]> wrote: > > > Thanks Dardo, I have taken your advise and added the addi

Re: What am I doing wrong???

2008-03-06 Thread damo
reply - not to my suprise as there is no directory or anything else that seems to have been created. Will go through the above docs. I have skipped through the manual, it does seem a little all over the place at the moment, but I hope to make sense of it. Many thanks, Damo. On Mar 5, 2:52 pm, &

What am I doing wrong???

2008-03-05 Thread damo
ly insane as I realise it is probably something so ridiculously simple. Any help will be most appreciated!! Damo --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send