I have a form lets say I'm doing a variation on the blog tutorial.

Instead of adding blogs I want to do locations as a kind of blog,
keeping things really simple with a title field and a select box that
is made up of all countries possible.

I have a table with the countries already so I created a model called
country.php to go alongside my location.php

so I saw it somewhere but going back over the model documentation I
cant see where -  how to read from a separate model if I am in a view
that is through naming convention using location.php as the model (db
table)

As I want to select from a drop down the country that is populated
from this new db table called countries.

<?php
echo $form->create('Location');
echo $form->input('location');

//need to get array of countries data from countries db table....

$options=...
echo $form->select('country',$options);

echo $form->end('Save Post');
?>

tx
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" 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