$getid) { $getepass = $_POST['Password'][$key]; $geturl = $_POST['WebAddress'][$key]; $getport = $_POST['WebPort'][$key]; $addr = shell_exec("sudo BASHSCRIPT HERE $getid $getepass $geturl $getport 2>&1"); } //$euser = escapeshellarg($getid); //$epass = escapeshellarg('$getpass'); //$WebAddress = escapeshellarg('$geturl'); //$Webport = escapeshellarg('$getport'); ?> #In bash script we put the variables in order as they are coming out in the shell_exec command