How to redirect user to previous page after form submit?
You want drupal_get_destination(). This function creates a 'destination' query parameter suitable for use in l() that will redirect the user back to the page they came from after submitting the form. So, when you create your link to add a new node, use the l() function along with drupal_get_destination(). For example...

l('Add new foto', 'path/to/add/a/foto', array('query' =&gt; drupal_get_destination()))


That should do it.