<?php require_once('Connections/Hosting.php'); ?>
<?php require_once('Connections/Hosting.php'); ?>
<?php require_once('Connections/Hosting.php'); ?>
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
if (PHP_VERSION < 6) {
$theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
}
$theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
switch ($theType) {
case "text":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "long":
case "int":
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
break;
case "double":
$theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
break;
case "date":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "defined":
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
break;
}
return $theValue;
}
}
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
if (PHP_VERSION < 6) {
$theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
}
$theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
switch ($theType) {
case "text":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "long":
case "int":
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
break;
case "double":
$theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
break;
case "date":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "defined":
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
break;
}
return $theValue;
}
}
mysql_select_db($database_Hosting, $Hosting);
$query_Applicants = "SELECT namelist.name, namelist.Occupation, namelist.id FROM namelist ORDER BY namelist.name";
$Applicants = mysql_query($query_Applicants, $Hosting) or die(mysql_error());
$row_Applicants = mysql_fetch_assoc($Applicants);
$totalRows_Applicants = mysql_num_rows($Applicants);
mysql_select_db($database_Hosting, $Hosting);
$query_Applicants2 = "SELECT namelist.Occupation, namelist.id FROM namelist ORDER BY namelist.name";
$Applicants2 = mysql_query($query_Applicants2, $Hosting) or die(mysql_error());
$row_Applicants2 = mysql_fetch_assoc($Applicants2);
$totalRows_Applicants2 = mysql_num_rows($Applicants2);
mysql_select_db($database_Hosting, $Hosting);
$query_Applicants_details = "SELECT namelist.name, namelist.Gender, namelist.address, namelist.NIC, namelist.Highest_Qualification, namelist.Occupation, namelist.CV_name, namelist.id, namelist.Picture FROM namelist ORDER BY namelist.name LIMIT 2";
$Applicants_details = mysql_query($query_Applicants_details, $Hosting) or die(mysql_error());
$row_Applicants_details = mysql_fetch_assoc($Applicants_details);
$totalRows_Applicants_details = mysql_num_rows($Applicants_details);
$var1_Applicants_details3 = "-1";
if (isset($_GET['id'])) {
$var1_Applicants_details3 = $_GET['id'];
$query_Applicants_details = sprintf("SELECT namelist.name, namelist.Gender, namelist.address, namelist.NIC, namelist.Highest_Qualification, namelist.Occupation, namelist.CV_name, namelist.id, namelist.Picture FROM namelist WHERE namelist.id = %s ORDER BY namelist.name ", GetSQLValueString($var1_Applicants_details3, "int"));
}else{
$query_Applicants_details = "SELECT namelist.name, namelist.Gender, namelist.address, namelist.NIC, namelist.Highest_Qualification, namelist.Occupation, namelist.CV_name, namelist.id, namelist.Picture FROM namelist ORDER BY namelist.name LIMIT 2";
}
$Applicants_details = mysql_query($query_Applicants_details, $Hosting) or die(mysql_error());
$row_Applicants_details = mysql_fetch_assoc($Applicants_details);
$totalRows_Applicants_details = mysql_num_rows($Applicants_details);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<script src="http://use.edgefonts.net/sarina.js"></script>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>PC Services</title>
<link href="Style/Style.css" rel="stylesheet" type="text/css" />
<script src="SpryAssets/SpryMenuBar.js" type="text/javascript"></script>
<link href="SpryAssets/SpryMenuBarHorizontal.css" rel="stylesheet" type="text/css" />
<style type="text/css">
a:link {
text-decoration: none;
}
a:visited {
text-decoration: none;
}
a:hover {
text-decoration: none;
}
a:active {
text-decoration: none;
}
</style>
</head>
<body>
<div id="header">
<h1>PC Services </h1>
<h2><img src="Images/chip.jpg" width="113" height="103" alt="chip" />"Solutions through Technology"</h2>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p>Services>Career>Job Applicants</p>
</div>
<div id="menu">
<ul id="MenuBar1" class="MenuBarHorizontal">
<li><strong><a href="index.html">Home</a>
</strong> </li>
<li><strong><a href="#">Products</a></strong></li>
<li><strong><a class="MenuBarItemSubmenu" href="#">Services</a>
</strong>
<ul>
<li><a href="Advertising.html">Advertising</a></li>
<li><strong><a class="MenuBarItemSubmenu" href="career.html">Career</a> </strong>
<ul>
<li><strong><a href="Job_applicants.php">Job_Applicants</a></strong></li>
<li><strong><a href="Occupational_groups.html">Occupational_Groups</a></strong></li>
</ul>
</li>
<li><strong><a href="Repairs.html">Repairs</a></strong></li>
<li><strong><a href="#">Upgrades</a></strong></li>
</ul>
</li>
<li><strong><a href="#">News</a></strong></li>
<li><strong><a href="#">Contact Us</a></strong></li>
</ul>
<form id="NIC" name="NIC" method="post" action="Search_NIC.php">
<p><strong>
<label for="search">SEARCH NIC#</label>
<input type="text" name="NIC" id="NIC" />
<input type="submit" name="submit" id="submit" value="GO" />
</strong></p>
</form>
</div>
<div id="home_2">
<h2>Job Applicants</h2>
<div id="name">
<h3>Name</h3>
<?php do { ?>
<p><a href="Applicants.php?id=<?php echo $row_Applicants['id']; ?>"><?php echo $row_Applicants['name']; ?></a></p>
<?php } while ($row_Applicants = mysql_fetch_assoc($Applicants)); ?>
</div>
<div id="occupation">
<h3>Position</h3>
<?php do { ?>
<p><?php echo $row_Applicants2['Occupation']; ?></p>
<?php } while ($row_Applicants2 = mysql_fetch_assoc($Applicants2)); ?>
</div>
<p> </p>
<p> </p>
<p> </p>
</div>
<div id="home_3">
<h2>Applicants Details</h2>
<?php do { ?>
<p><strong><em>Name>>> </em></strong><?php echo $row_Applicants_details['name']; ?></p>
<div id="picture">
<p><img src="<?php echo $row_Applicants_details['Picture']; ?>" /></p>
<p> </p>
</div>
<p><em><strong>Address >>></strong></em><?php echo $row_Applicants_details['address']; ?></p>
<p><em><strong>NIC#</strong></em>>>> <?php echo $row_Applicants_details['NIC']; ?></p>
<p><em><strong>Gender>>></strong></em> <?php echo $row_Applicants_details['Gender']; ?></p>
<p><em><strong>Occupation>>></strong></em> <?php echo $row_Applicants_details['Occupation']; ?></p>
<p><em><strong>Highest Qualification>>></strong></em><?php echo $row_Applicants_details['Highest_Qualification']; ?></p>
<p><em><strong>Download CV>>> </strong></em><a href="<?php echo $row_Applicants_details['CV_name']; ?>"><?php echo $row_Applicants_details['CV_name']; ?></a></p>
<p> </p>
<?php } while ($row_Applicants_details = mysql_fetch_assoc($Applicants_details)); ?>
<p> </p>
<p> </p>
<p> </p>
</div>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<div id="Footer">
<p>© PC Services Page last updated Friday, October 25, 2013</p>
<p> </p>
</div>
<p> </p>
<script type="text/javascript">
var MenuBar1 = new Spry.Widget.MenuBar("MenuBar1", {imgDown:"SpryAssets/SpryMenuBarDownHover.gif", imgRight:"SpryAssets/SpryMenuBarRightHover.gif"});
</script>
</body>
</html>
<?php
mysql_free_result($Applicants);
mysql_free_result($Applicants2);
mysql_free_result($Applicants_details);
?>
A copy of the page is above. I created a link to a word document using the property inspector and data sources and the database field containing the name of the word document in the repeat region. The results return the name of the document but when I try to download the work document it gives an error.