0

Hello Good People.

I need help with my database script,to an extent i have created all the tables i need...for 5 straight days i cant seem to find the solution to this please read my script below

1. i have a database with 2 tables, the admin andm users_cv tables

with the userform on the frontend you can upoad files and fill in your data
on the other hand as an ADMin i can view the data posted by users on an admin page, but the pain here is getting the code to make the uploaded file visible on the viewing admin page.


THIS IS THE ADMIN PAGE(VIEW.PHP) WHERE I VIEW DATA POSTED BY A VISITOR,THE ONLY PART OF THE FORM NOT WORKING IS WHERE YOU HAVE THE COLUMN FOR LEGAL DOCUMENTS(THIS IS SUPOSE TO SHOW THE FILE THE USER UPLOADED DURING THE ONLINE FILLING.

<?php session_start();
require_once('../Connections/recruit.php'); ?>
<!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>
<title>nass :: User's Profile</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
//-->
</script>
<style type="text/css">
<!--
.style1 {color: #000066}
.profileheader {font-family: Verdana, Arial, Helvetica, sans-serif;
	font-size: 24px;
	font-weight: bold;
	color: #000000;}
.shade {background-color: #666666;
	color: #FFFFFF;
	display: block;
	font-family: Arial, Helvetica, sans-serif;
	font-weight: bold;
	font-size: 12px;
	padding-left: 15px;}
.subheading {
	border-right-width: thin;
	border-bottom-width: medium;
	border-left-width: thin;
	border-top-style: solid;
	border-right-style: solid;
	border-bottom-style: solid;
	border-left-style: solid;
	border-right-color: #CCCCCC;
	border-bottom-color: #666666;
	border-left-color: #CCCCCC;
	font-family: Arial, Helvetica, sans-serif;
	font-size: 12px;
	font-weight: bold;
	color: #000000;
	border-top-width: thin;
	border-top-color: #CCCCCC;
}
h1 {
	font-family: Arial, Helvetica, sans-serif;
	font-weight: bold;
	color: #FFFFFF;
	background-color: #666666;
	border-bottom-width: medium;
	border-bottom-style: solid;
	border-bottom-color: #333333;
	text-indent: 20px;
}
body {
	font-family: Verdana, Arial, Helvetica, sans-serif;
	font-size: 12px;
	color: #003366;
}
-->
</style>
</head>
<body bgcolor="#FFFFFF">
<style TYPE="text/css">
<!--  A:link {text-decoration: none; color:#000055}  A:visited {text-decoration: none; color:#000055}  A:active {text-decoration: none; color:#000022}   A:hover {text-decoration: ; color:#00CC00 }-->
</style>
<?php 
$username = $_SESSION['username'];
$id = $_GET['id'];
mysql_select_db($database_recruit, $recruit);
$query_users = "SELECT * FROM users_cv WHERE id='$id'";
$users = mysql_query($query_users, $recruit) or die(mysql_error());
$row_users = mysql_fetch_assoc($users);
$totalRows_users = mysql_num_rows($users);
?>
<table width="786" border="0" align="left" cellpadding="0" cellspacing="2">
  <tr>
    <td align="left"><h2>
	<font color="#FF0000">
	<img border="0" src="../../images/Epic%20Logo.jpg" width="121" height="75">&nbsp;&nbsp;&nbsp; 
	Recruitment Database Administration </font> </h2></td>
  </tr>
  <tr>
    <td bgcolor="#006699"><h1>Profile of <?php echo $row_users['firstname']; ?> <?php echo $row_users['surname']; ?></h1></td>
  </tr>
  <tr>
    <td height="27"><div align="center">
        <table width="108%" border="1" cellpadding="2" cellspacing="0" bordercolor="#CCCCCC" bgcolor="#FFFFFF">
          <tr>
            <td height="25">
			<table width="805" border="0" align="left" cellpadding="2" cellspacing="2" bgcolor="#FFFFFF">
                <tr>
                  <td width="81%" height="121" valign="top" bgcolor="#FFFFFF">
                      <div align="left">
                        <table width="100%" border="0" cellspacing="3" cellpadding="3">
                          <tr >
                            <td class="subheading">Personal 
                              Data</td>
                            <td align="right" class="subheading" bgcolor="#CCCCCC"><a href= "javascript: history.back(-1)">
							<font color="#FF0000">&lt;&lt; Go back </font> </a></td>
                          </tr>
                          <tr>
                            <td width="146">First Name</td>
                            <td width="630"><span class="style1"><?php echo $row_users['firstname']; ?></span></td>
                          </tr>
                          <tr>
                            <td>Middle Name</td>
                            <td><span class="style1"><?php echo $row_users['middlename']; ?></span></td>
                          </tr>
                          <tr>
                            <td>Surname</td>
                            <td><span class="style1"><?php echo $row_users['surname']; ?></span></td>
                          </tr>
                          <tr>
                            <td>Prior Names</td>
                            <td><span class="style1"><?php echo $row_users['priornames']; ?></span></td>
                          </tr>
                          <tr>
                            <td>Reasons for change</td>
                            <td><span class="style1"><?php echo $row_users['reasons']; ?></span></td>
                          </tr>
                          <tr>
                            <td>Place of Birth</td>
                            <td><span class="style1"><?php echo $row_users['birthplace']; ?></span></td>
                          </tr>
                          <tr>
                            <td>Date of Birth</td>
                            <td><span class="style1"><?php echo $row_users['dob_day'];?><?php if(($row_users['dob_day']=="1") || ($row_users['dob_day']=="21") || ($row_users['dob_day']=="31")){echo"st ";}elseif(($row_users['dob_day']=="2") || ($row_users['dob_day']=="22")){echo"nd ";}elseif(($row_users['dob_day']=="") || ($row_users['dob_day']=="0")){echo"";}else{echo "th ";} ?>
                              <?php echo $row_users['dob_month']."  "; ?> <?php echo $row_users['dob_year']; ?> </span></td>
                          </tr>
                          <tr>
                            <td>Gender</td>
                            <td><span class="style1"><?php echo $row_users['sex']; ?></span></td>
                          </tr>
                          <tr>
                            <td>Nigeria Address</td>
                            <td><span class="style1"><?php echo $row_users['nigeria_address']; ?></span></td>
                          </tr>
                          <tr>
                            <td>State of Origin</td>
                            <td><span class="style1"><?php echo $row_users['state_of_origin']; ?></span></td>
                          </tr>
                          <tr>
                            <td>L.G.A</td>
                            <td><span class="style1"><?php echo $row_users['lga']; ?></span></td>
                          </tr>
                          <tr>
                            <td>Current Address</td>
                            <td><span class="style1"><?php echo $row_users['current_address']; ?></span></td>
                          </tr>
                          <tr>
                            <td>Phone</td>
                            <td><span class="style1"><?php echo $row_users['phone']; ?></span></td>
                          </tr>
                          <tr>
                            <td>Fax</td>
                            <td><span class="style1"><?php echo $row_users['fax']; ?></span></td>
                          </tr>
                          <tr>
                            <td>Email</td>
                            <td><span class="style1"><?php echo $row_users['email']; ?></span></td>
                          </tr>
                          <tr>
                            <td>Occupation</td>
                            <td><span class="style1"><?php echo $row_users['occupation']; ?></span></td>
                          </tr>
                          <tr>
                            <td>&nbsp;</td>
                            <td>SPECIAL IDENTIFICATION</td>
                          </tr>
                          <tr>
                            <td>Color of Eyes</td>
                            <td><span class="style1"><?php echo $row_users['eyes']; ?></span></td>
                          </tr>
                          <tr>
                            <td>Color of Hair</td>
                            <td><span class="style1"><?php echo $row_users['hair']; ?></span></td>
                          </tr>
                          <tr>
                            <td>Special Features</td>
                            <td><span class="style1"><?php echo $row_users['special_features']; ?></span></td>
                          </tr>
                          <tr>
                            <td>Height</td>
                            <td><span class="style1"><?php echo $row_users['height']; ?></span></td>
                          </tr>
                          <tr>
                            <td>Weight</td>
                            <td><span class="style1"><?php echo $row_users['weight']; ?></span></td>
                          </tr>
                          <tr>
                            <td>&nbsp;</td>
                            <td>MARITAL STATUS</td>
                          </tr>
                          <tr>
                            <td>Marital Status</td>
                            <td><span class="style1"><?php echo $row_users['marital_status']; ?></span></td>
                          </tr>
                          <tr>
                            <td>&nbsp;</td>
                            <td>NEXT OF KIN</td>
                          </tr>
                          <tr>
                            <td>Name</td>
                            <td><span class="style1"><?php echo $row_users['kinname']; ?></span></td>
                          </tr>
                          <tr>
                            <td>Address</td>
                            <td><span class="style1"><?php echo $row_users['kin_address']; ?></span></td>
                          </tr>
                          <tr>
                            <td>Relationship</td>
                            <td><span class="style1"><?php echo $row_users['kin_relationship']; ?></span></td>
                          </tr>
                          </table>
                        <table width="100%" border="0" cellspacing="3" cellpadding="3">
                          <tr>
                            <td bgcolor="#CCCCCC"><b>
							<font face="Arial" size="2" color="#000000">Legal 
							Documents:</font></b></td>
                          </tr>
                          <tr>
                            <td>&nbsp;PLEASE WHAT CODE DO I PUT HERE?</td>
                          </tr>
                        </table>
                      </div>
                    </blockquote></td>
                </tr>
                <tr>
                  <td height="23" align="right" background="../../db_recruit/images/cogbg.gif" bgcolor="#FFFFFF"><a href= "javascript: history.back(-1)"><< Go back </a></td>
                </tr>
              </table>
              <?php 
			  
					  ?>
            </td>
          </tr>
        </table>
      </div></td>
  </tr>
  <tr>
    <td height="27"><table width="100%" border="1" cellpadding="0" cellspacing="0" bordercolor="#999999">
        <tr>
          <td><div align="center">
              <table width="103%" border="0" cellpadding="3" cellspacing="0" bgcolor="#FFFFFF">
                <tr>
                  <td bgcolor="#999999"><font size="1" face="verdana">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
					</td>
                </tr>
                <tr>
                  <td bgcolor="#FF0000"><font color="#006699" size="1" face="Verdana">
					<font color="#FFFFFF">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font></font></td>
                </tr>
                </table>
            </div></td>
        </tr>
      </table></td>
  </tr>
  <tr>
    <td height="12"><div align="center"><font color="#006699" size="1" face="Verdana">&nbsp;</div></td>
  </tr>
</table>
<br />
</body>
</html>
<?php
mysql_free_result($users);
?>

THIS IS THE DATABASE TABLE

--
-- Table structure for table `users_cv`
--

CREATE TABLE `users_cv` (
  `id` int(11) NOT NULL auto_increment,
  `date_posted` varchar(30) collate latin1_general_ci default NULL,
  `title` varchar(50) collate latin1_general_ci default NULL,
  `firstname` varchar(50) collate latin1_general_ci default NULL,
  `middlename` varchar(50) collate latin1_general_ci default NULL,
  `surname` varchar(50) collate latin1_general_ci default NULL,
  `priornames` varchar(50) collate latin1_general_ci default NULL,
  `reasons` varchar(255) collate latin1_general_ci default NULL,
  `birthplace` varchar(50) collate latin1_general_ci default NULL,
  `dob_month` varchar(20) collate latin1_general_ci default NULL,
  `dob_day` varchar(20) collate latin1_general_ci default NULL,
  `dob_year` varchar(20) collate latin1_general_ci default NULL,
  `sex` varchar(10) collate latin1_general_ci default NULL,
  `nigeria_address` varchar(255) collate latin1_general_ci default NULL,
  `state_of_origin` varchar(20) collate latin1_general_ci default NULL,
  `lga` varchar(255) collate latin1_general_ci default NULL,
  `current_address` varchar(255) collate latin1_general_ci default NULL,
  `phone` varchar(50) collate latin1_general_ci default NULL,
  `fax` varchar(50) collate latin1_general_ci default NULL,
  `email` varchar(50) collate latin1_general_ci default NULL,
  `occupation` varchar(50) collate latin1_general_ci default NULL,
  `eyes` varchar(50) collate latin1_general_ci default NULL,
  `hair` varchar(50) collate latin1_general_ci default NULL,
  `height` varchar(20) collate latin1_general_ci default NULL,
  `weight` varchar(20) collate latin1_general_ci default NULL,
  `marital_status` varchar(20) collate latin1_general_ci default NULL,
  `kinname` varchar(50) collate latin1_general_ci default NULL,
  `kin_address` varchar(255) collate latin1_general_ci default NULL,
  `kin_relationship` varchar(50) collate latin1_general_ci default NULL,
  `resume` longtext collate latin1_general_ci,
  `name` varchar(50) collate latin1_general_ci default NULL,
  `type` varchar(50) collate latin1_general_ci default NULL,
  `size` varchar(50) collate latin1_general_ci default NULL,
  `content` varchar(225) collate latin1_general_ci default NULL,
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci AUTO_INCREMENT=1 ;

--
-- Dumping data for table `users_cv`
2
Contributors
1
Reply
2
Views
6 Years
Discussion Span
Last Post by pritaeas
0

How and where is your document stored ? You probably need to query your database, and provide a link to show the content of your document.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.