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
($this->data['User']['password_confirm']))
> unset($this->data['User']['password_confirm']);
> if (isset($this->data['User']['old_password']))
> unset
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'][
=.' 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
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' =>
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
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
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
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($
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(
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
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
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', ...);
> >
uot;Active" )));
}
function viewx()
{
$this->set('students', $this->Student-
>findAll(array( 'Student.status' => "Active",
'Student.state' != "X")));
}
$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
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!
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
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, &
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
19 matches
Mail list logo