I'm sure this is super easy also, but can't find how to do it in the
cookbook for 1.2.

So what I want to do is using the form helper upload a file (jpeg or
jpg) and then save it to the directory /img/students/ and rename it to
studentnumber.jpg (where student number is a field within the 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!

<?php
$image = $student['Student']['studentnumber'];
echo '<img src="/img/students/';
echo "$image";
echo '.jpg" width="300" border="0" alt="No student Image Available">';
?>

Many thanks,
Damo
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to