Dear all
I am using the function below to pass variables between scripts using the post method.
From what i can see, it seems to pass the information to the server but doesn't accept any response. How can I use the post method and take the browser to the target page?
PS I have to use the post method because I am validating text variables which some proxy servers would truncate as url arguments.
Thanks
Marcus
function PostFormData($host, $path, $data) {
$fp = fsockopen($host,80);
fputs($fp, "POST $path HTTP/1.1\n");
fputs($fp, "Host: $host\n");
fputs($fp, "Content-type: application/x-www-form-urlencoded\n");
fputs($fp, "Content-length: ".strlen($data)."\n");
fputs($fp, "Connection: close\n\n");
fputs($fp, $data);
while(!feof($fp)) {
echo fgets($fp,128)."<br>";
}
fclose($fp);
}