I have created a route for my delete method which is example.com/admin/
delete-photo.php?id=1
when I click a link to delete a photo, the photo deletes but then i am
redirected to example.com/admin/photos/delete/ when I have never told
it to do this. I have included my delete method below. Any clues to
why this is happening?
function admin_delete() {
if(!empty($_GET['id'])) {
$this->Photo->id = $_GET['id'];
$photo = $this->Photo->read();
$this->Photo->delete();
unlink(APP . WEBROOT_DIR . '/img/park_photos/' .
$photo['Photo']
['location']);
$this->redirect("/admin/view-skatepark.php?id=" .
$photo['Photo']
['skatepark_id']);
}
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---