<?php require_once(dirname(__FILE__) . '/loading.html'); // require the file, don't redirect away from your code include ("file\where\the\variable\comes\from.php"); $s = shell_exec("powershell path\\to\\script.ps1 '$variable'< NUL"); if (strpos($s, 'True') === false) { header('Location: /succes.html'); // is this a typo in your code? 'succes' exit(); // need this } else{ header('Location: /failed.html'); exit(); // need this }
You have javascript disabled. You will not be able to edit any code.