0

I'm trying to upload an image to my database and retreive it later for use.

I've got this all working but when I'm on the page where it shows the image I can't use : header("location: ../Home/Home.php"); anymore. It says :

Warning: Cannot modify header information - headers already sent by (output started at C:\wamp\www\Helpdesk SALTO\Helpdesk\Melding\VMelding.php:66) in C:\wamp\www\Helpdesk SALTO\Helpdesk\Melding\VMelding.php on line 114

It is being send by my image an echo of : img height ="300" width="300" src="data:image;base64,'.$row2["image"].'

$row2["image"] : contains largeblob information of the image in my database.

  • Is there another way to redirect to another page ?

    If not:

  • is there a way for me to still show the image without it using header information ?

BigMacMenu
  • 92
  • 10
  • Possible duplicate of [How to fix "Headers already sent" error in PHP](http://stackoverflow.com/questions/8028957/how-to-fix-headers-already-sent-error-in-php) – xRahul May 17 '17 at 11:02

1 Answers1

0

Well you can redirect by JS.

Something like this: window.location.replace("http://stackoverflow.com");

KaSkuLL
  • 531
  • 6
  • 27