Jump to content

open word document from mysql database via dropdown menu


renzomassaro

Recommended Posts

Hello,

 

I have a script that shows data from a field in mine mysql database. These data in the mysql database are word documents that i've imported.

 

What I want is that when i choose 1 from the list the document is opened, is this possible? and if yes, how?

 

This is my script of my dropdownlist so far

 

<?

mysql_connect('localhost','root','');

mysql_select_db("helpdesk");

?>

 

Document: <select name="Document<? echo $i; ?>"><option selected value="">Selecteer document</option>

<?

$SQL = "select naam from documentatie order by naam";

$SQLResult = mysql_query($SQL) or die("Error with query: $SQL");

while($SQLData = mysql_fetch_array($SQLResult))

{

$naam = $SQLData["naam"];

if ($naam !="")

{

print "<option value=\"$naam\">";

print $naam;

print "</option>";

}

}

?>

</select>

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.