well, I have given up ... uploading the powerpoints.
I can't do html-presentations ... since there are like 60-80 different powerpoints.
I am doing a general presentation through a php-site and when I need additional information, I want to smoothly open up a power point from the computer.
The site is running in full screen so I don't want to close down the browser window, open up explorer, search for the file and open it there.
No, I want to have a browse button on my site, where I browse my computer, click the submit-button ... and the powerpoint opens.
The following code should take care of my request (but for some reason it will not str_replace my path)
in_pp.php
<?
require("dbmanager.php");
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Browse powerpoint</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link href="style2.css" rel="STYLESHEET" type="text/css">
</head>
<body>
<form name="sendFile" method="post" action="in_pp2.php" enctype="multipart/form-data">
<input type="hidden" name="path"/>
<input type="hidden" name="isubmit" value="Open"/>
<input type="file" size="15" name="file" class="button"/>
<input type="button" value="Open" class="button" OnClick="this.form.path.value = this.form.file.value; this.form.submit()">
</form>
</body>
</html>
in_pp2.php
<?php
$path= $_POST["path"];
$path = str_replace("file:///","", $path);
$path = str_replace("://",":/", $path);
header("Location: $path");
exit;
?>