I am trying to add in my insertToDB.php
file, that after some information, the page will redirect from www.example.com/insertToDB.php to the original page: www.example.com. I have tried a few thing like:
window.open("https://www.example.com","_self");
But this gives me error:
Warning: Use of undefined constant window - assumed 'window' (this will throw an Error in a future version of PHP) in /storage/ssd3/554/14293554/public_html/insertToDB.php on line 24
Fatal error: Uncaught Error: Call to undefined function open() in /storage/ssd3/554/14293554/public_html/insertToDB.php:24 Stack trace: #0 {main} thrown in /storage/ssd3/554/14293554/public_html/insertToDB.php on line 24
Also tried this:
/* Redirect browser */
header("Location: http://www.example.com/");
exit();
But gives me error:
Warning: Cannot modify header information - headers already sent by (output started at /storage/ssd3/554/14293554/public_html/insertToDB.php:22) in /storage/ssd3/554/14293554/public_html/insertToDB.php on line 25