hi everybody,
when I want to see users/index page I can see the list and everything
is normal
but if I want to see users/add page the server says "the requested
address was not found on this server"
tmp is writable so where is the problem am I going to be crazy??
these are my control codes
function index()
{
//we turn debugging off; debugging breaks ajax
Configure::write('debug', '0');
//we set the layout to Ajax so the ajax doesn't break
$this->layout = "ajax";
//this will hold our data from the database.
$cityArray = array();
//counts the number of records in City.
$count = $this->City->findCount();
//gets all the City records and sorts them by id with limit
command
$cityA = $this->City->findAll();
//convert $cityArray into a json-friendly format
$cityArray = Set::extract($cityA, '{n}.City');
//send to view
$this->set('total', $count);
$this->set('cities', $cityArray);
}
function add() {
//we turn debugging off; debugging breaks ajax
Configure::write('debug', '0');
//we set the layout to Ajax so the ajax doesn't break
$this->layout = 'Ajax';
if (!empty($this->data))
{
$this->City->create();
if ($this->City->save($this->data))
{
//this is a json statement. EXT forms need
this to know if things
worked
$this->set('success', '{success:true}');
}
else
{
//EXT forms need this to know if something went
wrong
$this->set('success', '{success:false}');
}
}
else
{
$this->set('success', '{success:false}');
}
}
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---