Forum Moderators: coopster
If that makes it display the pdf instead of download it, then link to a php file that sends the correct download header [php.net].
//Block possible hack attempts by removing all slashes from the input--you may need to change this depending on your scenario
$file = preg_replace( "/[\/\\\\]/", "", $_POST["file"] );
if ( is_file( $file ) )
{
header( "Location: ".$file );
}
else
{
echo "Invalid file!";
}
?>
<form action="./this_page.php" method="POST">
<input type="radio" name="file" value="file1.pdf">
<input type="radio" name="file" value="file2.pdf">
</form>