Jump to content

send header


jagguy

Recommended Posts

Hi,

I run a php script and want to return to another page automatically.
I get an error when the headers are resent it says, but I thought this is how it is done.

...      $sql = "INSERT INTO image2 (id,url,filename,description,del)
          VALUES(NULL,'http://localhost/php/images/','$file','$desc',NULL) ";
      $result = mysql_query("$sql")    or die("Invalid query: " . mysql_error());

      }
        mysql_close($link);


header( "Location: http://localhost/php/addImage4.html" ); //error
exit;
Link to comment
https://forums.phpfreaks.com/topic/27835-send-header/
Share on other sites

This seems to just goto the file straight away. I want it to do something then return automatically.

<?php header ("Content-type: image/png");//must be in 1st col and line of file

ignore_user_abort(true);
header('Location: http://localhost/php/upload2.html');

//do some image resizing in this file
..
Link to comment
https://forums.phpfreaks.com/topic/27835-send-header/#findComment-127399
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.