Reputation: 25
So I have been manipulating images using the GD library, and would like to first save those images and then redirect the user to another page. However, with the imagepng() function that appears to be impossible.
see below:
/// image manipulations beforehand
imagepng($image, $savepath);
echo '<meta http-equiv="refresh" content="0;URL=different_page.php"/> ';
Whilst it does save the images in question, it doesn't allow for any redirections afterwards. Hence my question: what other way is there to save these images without using imagepng?
Upvotes: 1
Views: 76
Reputation: 4723
Do not use meta element with php to redirect, use php location header.
imagepng($image, $savepath);
header('Location: different_page.php');
Upvotes: 2