Jump to content

header(); not working properly...


jayvenom

Recommended Posts

hey i have created a  page which is used to insert records into mySql..

records get inserted perfectedly....

but after insertion its not loading into another page...that is the inserted record must be reviewd..

 

 

NOTE:this works perfectly in WAMP5 server... but not in my host...

also header() works for other files except this....

Link to comment
https://forums.phpfreaks.com/topic/152782-header-not-working-properly/
Share on other sites

Using a <meta> redirect when you are outputting something on a page will waste your hosting account bandwidth.

 

You need to find the reason why your code stopped working and fix it, especially since there is only a problem on one page.

actually i used Dreamweaver for that...

am new to this php...

 $insertGoTo = "viewinad.php";
  if (isset($_SERVER['QUERY_STRING'])) {
    $insertGoTo .= (strpos($insertGoTo, '?')) ? "&" : "?";
    $insertGoTo .= $_SERVER['QUERY_STRING'];
  }
  header(sprintf("Location: %s", $insertGoTo));

 

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.