Dreamweaver CS3 dynamic php: populate form fields from result page

omojesu
omojesu used Ask the Experts™
on
I have search and result pages. In the result page I have added an 'apply' link which will open a form for the user to apply for the job and insert personal details into the database. My challenge is this, I want some of the fields in the result page to populate the form fields automatically so that I can know what job the user is applying for.
The two fields I will like to populate automatically from the result page onto the form are the jobid and job_Title fields.
<========start of result page===============>
<?php require_once('Connections/dsSEV.php'); ?><?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") 
{
  $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;
}
}
 
$maxRows_DetailRS1 = 20;
$pageNum_DetailRS1 = 0;
if (isset($_GET['pageNum_DetailRS1'])) {
  $pageNum_DetailRS1 = $_GET['pageNum_DetailRS1'];
}
$startRow_DetailRS1 = $pageNum_DetailRS1 * $maxRows_DetailRS1;
 
$colname_DetailRS1 = "-1";
if (isset($_GET['recordID'])) {
  $colname_DetailRS1 = $_GET['recordID'];
}
mysql_select_db($database_dsSEV, $dsSEV);
$query_DetailRS1 = sprintf("SELECT * FROM jobs WHERE jobId = %s ORDER BY date_Uploaded ASC", GetSQLValueString($colname_DetailRS1, "int"));
$query_limit_DetailRS1 = sprintf("%s LIMIT %d, %d", $query_DetailRS1, $startRow_DetailRS1, $maxRows_DetailRS1);
$DetailRS1 = mysql_query($query_limit_DetailRS1, $dsSEV) or die(mysql_error());
$row_DetailRS1 = mysql_fetch_assoc($DetailRS1);
 
if (isset($_GET['totalRows_DetailRS1'])) {
  $totalRows_DetailRS1 = $_GET['totalRows_DetailRS1'];
} else {
  $all_DetailRS1 = mysql_query($query_DetailRS1);
  $totalRows_DetailRS1 = mysql_num_rows($all_DetailRS1);
}
$totalPages_DetailRS1 = ceil($totalRows_DetailRS1/$maxRows_DetailRS1)-1;
 
mysql_select_db($database_dsSEV, $dsSEV);
$query_rsCurrent = "SELECT jobId, job_Title, job_Sector, job_Status FROM jobs ORDER BY jobId DESC LIMIT 3#";
$rsCurrent = mysql_query($query_rsCurrent, $dsSEV) or die(mysql_error());
$row_rsCurrent = mysql_fetch_assoc($rsCurrent);
$totalRows_rsCurrent = mysql_num_rows($rsCurrent);
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><!-- InstanceBegin template="/Templates/main1.dwt" codeOutsideHTMLIsLocked="false" -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- InstanceBeginEditable name="doctitle" -->
<title>Southeast Voluntary Services</title>
<!-- InstanceEndEditable -->
<style type="text/css" media="all">
<!--
/* This rule resets a core set of elements so that they will appear consistent across browsers. Without this rule, content styled with an h1 tag, for example, would appear in different places in Firefox and Internet Explorer because each browser has a different top margin default value. By resetting these values to 0, the elements will initially be rendered in an identical fashion and their properties can be easily defined by the designer in any subsequent rule. */
html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6 {
  margin: 0;
  padding: 0;
  border: 0;
  outline: 0;
  font-size: 100%;
}
/* The body is the outermost layout component and contains the visible page content. Setting properties for the body element will help to create consistent styling of the page content and more manageable CSS. Besides using the body element to set global properties, it is common to use the body element to set the background color of the page and create a centered container for the page content to display. */
body {
  background-color: #fff;
  color: #222847;
  font-family: "Palatino Linotype", "Book Antiqua", Palatino, serif;
  font-size: 12px;
  line-height: 16px;
  margin: 0 0 0 0; /* Sets the margin properties for an element using shorthand notation (top, right, bottom, left) */
  padding: 0 0 0 0; /* Sets the padding properties for an element using shorthand notation (top, right, bottom, left) */
  text-align: center; /* Centers the page content container in IE 5 browsers. */
}
/* Commonly used to style page titles. */
h1 {
  color: #fff;
  font-family: "Trebuchet MS", Helvetica, sans-serif;
  font-size: 18px;
  font-weight: bold;
  line-height: 14px;
}
/* Commonly used to style section titles. */
h2 {
  color: #fff;
  font-family: "Trebuchet MS", Helvetica, sans-serif;
  font-size: 16px;
  font-weight: bold;
  line-height: 14px;
}
/* Sets the style for unvisited links. */
a,  a:link {
  color: #003399;
  font-weight: bold;
  text-decoration: none;
}
/* Sets the style for visited links. */
a:visited {
  color: #003399;
  text-decoration: none;
}
/* Sets the style for links on mouseover. */
a:hover {
  color: #003399;
  text-decoration: underline;
}
/* Sets the style for a link that has focus. */
a:focus {
  color: #003399;
}
/* Sets the style for a link that is being activated/clicked. */
a:active {
  color: #003399;
}
/* This is a container for the page content. It is common to use the container to constrain the width of the page content and allow for browser chrome to avoid the need for horizontal scrolling. For fixed layouts you may specify a container width and use auto for the left and right margin to center the container on the page. IE 5 browser require the use of text-align: center defined by the body element to center the container. For liquid layouts you may simply set the left and right margins to center the container on the page. */
#outerWrapper {
  margin: 0 auto 0 auto; /* Sets the margin properties for an element using shorthand notation (top, right, bottom, left) */
  padding-top: 11px;
  text-align: left; /* Redefines the text alignment defined by the body element. */
  width: 900px;
}
#outerWrapper #headerBackground {
	background: url(southeastautosaved_images/header_bg0000B.png) no-repeat bottom;
}
#outerWrapper #headerBackground #headerBottom {
	height: 220px;
	background: url(southeastautosaved_images/header_bottom0000A.png) no-repeat bottom;
}
#outerWrapper #headerBackground #headerBottom #headerTop {
	background-image: url("southeastautosaved_images/header_top0000.png");
	background-repeat: no-repeat;
	color: #fff;
	font-size: 12px;
	font-weight: bold;
	line-height: 15px;
	padding: 93px 28px 28px; /* Sets the padding properties for an element using shorthand notation (top, right, bottom, left) */
}
#outerWrapper #contentWrapper {
  background-image: url("southeastautosaved_images/contentWrapper_bg0000.png");
  background-repeat: repeat-y;
  overflow: hidden;
  padding-left: 14px;
  padding-right: 14px;
}
#outerWrapper #contentWrapper #rightSidebar {
  float: right;
  padding: 14px 14px 14px 14px; /* Sets the padding properties for an element using shorthand notation (top, right, bottom, left) */
  width: 169px;
}
#outerWrapper #contentWrapper #leftSidebar {
	float: left;
	padding: 14px 0px; /* Sets the padding properties for an element using shorthand notation (top, right, bottom, left) */
	width: 195px;
}
/* Contains the main page content. When using a mutliple column layout the margins will be set to account for the floated columns' width, margins, and padding. */
#outerWrapper #contentWrapper #content {
  margin: 0 197px 0px 197px; /* Sets the margin properties for an element using shorthand notation (top, right, bottom, left) */
  padding: 14px 14px 14px 14px; /* Sets the padding properties for an element using shorthand notation (top, right, bottom, left) */
}
#outerWrapper #footerBackground {
  background-image: url("southeastautosaved_images/footer_bg0000.png");
  background-repeat: repeat-y;
}
#outerWrapper #footerBackground #footerBottom {
  background-image: url("southeastautosaved_images/footer_bottom0000.png");
  background-position: bottom;
  background-repeat: no-repeat;
}
#outerWrapper #footerBackground #footerBottom #footerTop {
  background-image: url("southeastautosaved_images/footer_top0000.png");
  background-repeat: no-repeat;
  color: #fff;
  font-size: 12px;
  font-weight: bold;
  line-height: 15px;
  padding: 24px 28px 24px 28px; /* Sets the padding properties for an element using shorthand notation (top, right, bottom, left) */
}
-->
</style>
<style type="text/css" media="print">
<!--
/* It is common to set printer friendly styles such as a white background with black text. */
body {
  background-color: #fff;
  background-image: none;
  border-color: #000; /* Sets the border color properties for an element using shorthand notation */
  color: #000;
}
-->
</style>
<!--[if IE 5]>
<style type="text/css"> 
/* IE 5 does not use the standard box model, so the column widths are overidden to render the page correctly. */
#outerWrapper #contentWrapper #leftSidebar {
  width: 197px;
}
#outerWrapper #contentWrapper #rightSidebar {
  width: 197px;
}
</style>
<![endif]-->
<!--[if IE]>
<style type="text/css"> 
/* The proprietary zoom property gives IE the hasLayout property which addresses several bugs. */
#outerWrapper #contentWrapper, #outerWrapper #contentWrapper #content {
  zoom: 1;
}
</style>
<![endif]-->
<!--[if lt IE 7]>
<style type="text/css"> 
img, div {
  behavior: url("southeastautosaved_images/iepngfix.htc");
}
</style>
<![endif]-->
<script type="text/javascript" src="CSSMenuWriter/cssmw0/menu.js"></script>
<script src="SpryAssets/SpryMenuBar.js" type="text/javascript"></script>
<style type="text/css" media="all">
<!--
@import url("CSSMenuWriter/cssmw0/menu.css");
-->
</style>
<!--[if lte IE 6]>
<style type="text/css" media="all">
@import url("CSSMenuWriter/cssmw0/menu_ie.css");
</style>
 
<![endif]-->
<!-- InstanceBeginEditable name="head" --><!-- InstanceEndEditable -->
<link href="SpryAssets/SpryMenuBarVertical.css" rel="stylesheet" type="text/css" />
<style type="text/css">
<!--
.style1 {
	color: #DF001F;
	font-style: italic;
	font-weight: bold;
}
.style2 {color: #FFFFFF}
-->
</style>
<script src="Scripts/AC_RunActiveContent.js" type="text/javascript"></script>
</head>
 
<body>
 
<div id="outerWrapper">
  <div id="headerBackground">
    <div id="headerBottom"></div>
  </div>
  <div id="contentWrapper">
    <div id="rightSidebar">
<h2 align="center">Most Recent Jobs</h2>
<!-- InstanceBeginEditable name="rightsidebartop" -->
<?php do { ?>
  <form id="form1" method="post" action="">
      <table width="100%" border="0">
        <tr>
          <td width="32%">Title:</td>
              <td width="68%"><?php echo $row_rsCurrent['job_Title']; ?></td>
          </tr>
        <tr>
          <td>Sector:</td>
              <td><?php echo $row_rsCurrent['job_Sector']; ?></td>
          </tr>
        <tr>
          <td>Status:</td>
              <td><?php echo $row_rsCurrent['job_Status']; ?></td>
          </tr>
        <tr>
          <td colspan="2"><div align="center" class="style1">
            <label><a href="detail.php?recordID=<?php echo $row_rsCurrent['jobId']; ?>">View</a></label>
          </div></td>
        </tr>
        </table>
  </form>
  <?php } while ($row_rsCurrent = mysql_fetch_assoc($rsCurrent)); ?><!-- InstanceEndEditable -->
<hr />
<!-- InstanceBeginEditable name="rightsidebarbot" -->
<table width="90%" border="0">
  <tr>
    <td colspan="2"><div align="center">
      <h2>Contact Us</h2>
    </div></td>
  </tr>
  <tr>
    <td>Tel:</td>
    <td>&nbsp;020 8855 4441</td>
  </tr>
  <tr>
    <td>Email:</td>
    <td>jobs@sevagency.com</td>
  </tr>
</table>
<p>&nbsp;</p>
<!-- InstanceEndEditable --></div>
    <div id="leftSidebar">
      <ul id="MenuBar1" class="MenuBarVertical">
        <li><a href="default.php">Home</a>          </li>
        <li><a href="about.php">About Us</a></li>
        <li><a href="mission.php">Mission</a>          </li>
  <li><a href="jobmaster.php" class="MenuBarItemSubmenu">Browse for Jobs</a>
            <ul>
              <li><a href="searchjob.php">Job Search</a></li>
              <li><a href="uploadcv.php">Upload CV</a></li>
          </ul>
        </li>
  <li><a href="staff.php" class="MenuBarItemSubmenu">Staff</a>
            <ul>
              <li><a href="newjobs.php">Upload Jobs</a></li>
              <li><a href="jobadmin.php">Update Jobs</a></li>
              <li><a href="newstaff.php">Staff Admin</a></li>
          </ul>
        </li>
        <li><a href="contacts.php">Contact Us</a></li>
      </ul>
      <p align="center">
        <script type="text/javascript">
AC_FL_RunContent( 'codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0','width','180','height','150','title','southeast training centre','src','../flash/stc','quality','high','pluginspage','http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash','movie','../flash/stc' ); //end AC code
</script><noscript><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" width="180" height="150" title="southeast training centre">
          <param name="movie" value="flash/stc.swf" />
          <param name="quality" value="high" />
          <embed src="flash/stc.swf" quality="high" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="180" height="150"></embed>
        </object></noscript>
      
      <hr />
<p>&nbsp;</p>
    </div>
    <div id="content">
<h1><!-- InstanceBeginEditable name="contentheader" -->Job detail page<!-- InstanceEndEditable --></h1>
<hr />
<!-- InstanceBeginEditable name="contentmain" -->
<table border="0" cellpadding="5" cellspacing="5">
  <tr>
    <td><h2>Ref:</h2></td>
    <td>SE<?php echo $row_DetailRS1['jobId']; ?>V9</td>
  </tr>
  <tr>
    <td><h2>Title</h2></td>
    <td><?php echo $row_DetailRS1['job_Title']; ?></td>
  </tr>
  <tr>
    <td><h2>Sector</h2></td>
    <td><?php echo $row_DetailRS1['job_Sector']; ?> </td>
  </tr>
  <tr>
    <td><h2>Specification</h2></td>
    <td><?php echo $row_DetailRS1['long_Desc']; ?> </td>
  </tr>
  <tr>
    <td><h2>Type</h2></td>
    <td><?php echo $row_DetailRS1['job_Status']; ?> </td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td><a href="uploadcv.php?detail.php?recordID=<?php echo $row_DetailRS1['jobId']; ?>">Apply</a></td>
  </tr>
</table>
<p><img src="images/jobs2.gif" alt="" width="450" height="200" /></p>
<!-- InstanceEndEditable -->
<p>&nbsp;</p>
    </div>
  </div>
  <div align="center"></div>
  <div id="footerBackground">
    <div id="footerBottom">
      <div id="footerTop">
        <div align="right"><span class="bodwh2">&nbsp;&copy; 2009 Southeast Voluntary Services </span> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="privacy.php"><span class="style2">Privacy</span></a></div>
      </div>
    </div>
  </div>
</div>
 
<script type="text/javascript">
<!--
var MenuBar1 = new Spry.Widget.MenuBar("MenuBar1", {imgRight:"../SpryAssets/SpryMenuBarRightHover.gif"});
//-->
</script>
</body>
<!-- InstanceEnd --></html><?php
mysql_free_result($DetailRS1);
 
mysql_free_result($rsCurrent);
?>
<========/end of result page===============>
 
<========start of uploadcv page (form)===============>
<?php require_once('Connections/dsSEV.php'); ?>
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") 
{
  $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;
}
}
 
$editFormAction = $_SERVER['PHP_SELF'];
if (isset($_SERVER['QUERY_STRING'])) {
  $editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']);
}
 
if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "form2")) {
  $insertSQL = sprintf("INSERT INTO applicants (firstname, lastname, DOB, gender, Nationality, NI, Qualifications, EmploymentHistory, email, Telephone, comments, `references`, contactReferences, contactAddress) VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s)",
                       GetSQLValueString($_POST['firstname'], "text"),
                       GetSQLValueString($_POST['lastname'], "text"),
                       GetSQLValueString($_POST['DOB'], "date"),
                       GetSQLValueString($_POST['gender'], "int"),
                       GetSQLValueString($_POST['Nationality'], "text"),
                       GetSQLValueString($_POST['NI'], "int"),
                       GetSQLValueString($_POST['Qualifications'], "text"),
                       GetSQLValueString($_POST['EmploymentHistory'], "text"),
                       GetSQLValueString($_POST['email'], "text"),
                       GetSQLValueString($_POST['Telephone'], "int"),
                       GetSQLValueString($_POST['comments'], "text"),
                       GetSQLValueString($_POST['references'], "text"),
                       GetSQLValueString($_POST['contactReferences'], "int"),
                       GetSQLValueString($_POST['contactAddress'], "text"));
 
  mysql_select_db($database_dsSEV, $dsSEV);
  $Result1 = mysql_query($insertSQL, $dsSEV) or die(mysql_error());
 
  $insertGoTo = "thankyou.php";
  if (isset($_SERVER['QUERY_STRING'])) {
    $insertGoTo .= (strpos($insertGoTo, '?')) ? "&" : "?";
    $insertGoTo .= $_SERVER['QUERY_STRING'];
  }
  header(sprintf("Location: %s", $insertGoTo));
}
 
mysql_select_db($database_dsSEV, $dsSEV);
$query_rsCurrent = "SELECT jobId, job_Title, job_Sector, job_Status FROM jobs ORDER BY jobId DESC LIMIT 3#";
$rsCurrent = mysql_query($query_rsCurrent, $dsSEV) or die(mysql_error());
$row_rsCurrent = mysql_fetch_assoc($rsCurrent);
$totalRows_rsCurrent = mysql_num_rows($rsCurrent);
 
$colname_rsJobtitle = "-1";
if (isset($_GET['jobId'])) {
  $colname_rsJobtitle = (get_magic_quotes_gpc()) ? $_GET['jobId'] : addslashes($_GET['jobId']);
}
mysql_select_db($database_dsSEV, $dsSEV);
$query_rsJobtitle = sprintf("SELECT jobId, job_Title FROM jobs WHERE jobId = %s", GetSQLValueString($colname_rsJobtitle, "int"));
$rsJobtitle = mysql_query($query_rsJobtitle, $dsSEV) or die(mysql_error());
$row_rsJobtitle = mysql_fetch_assoc($rsJobtitle);
$totalRows_rsJobtitle = mysql_num_rows($rsJobtitle);
 
$maxRows_DetailRS1 = 20;
$pageNum_DetailRS1 = 0;
if (isset($_GET['pageNum_DetailRS1'])) {
  $pageNum_DetailRS1 = $_GET['pageNum_DetailRS1'];
}
$startRow_DetailRS1 = $pageNum_DetailRS1 * $maxRows_DetailRS1;
 
$colname_DetailRS1 = "-1";
if (isset($_GET['recordID'])) {
  $colname_DetailRS1 = $_GET['recordID'];
}
mysql_select_db($database_dsSEV, $dsSEV);
$query_DetailRS1 = sprintf("SELECT * FROM jobs WHERE jobId = %s ORDER BY date_Uploaded ASC", GetSQLValueString($colname_DetailRS1, "int"));
$query_limit_DetailRS1 = sprintf("%s LIMIT %d, %d", $query_DetailRS1, $startRow_DetailRS1, $maxRows_DetailRS1);
$DetailRS1 = mysql_query($query_limit_DetailRS1, $dsSEV) or die(mysql_error());
$row_DetailRS1 = mysql_fetch_assoc($DetailRS1);
 
if (isset($_GET['totalRows_DetailRS1'])) {
  $totalRows_DetailRS1 = $_GET['totalRows_DetailRS1'];
} else {
  $all_DetailRS1 = mysql_query($query_DetailRS1);
  $totalRows_DetailRS1 = mysql_num_rows($all_DetailRS1);
}
$totalPages_DetailRS1 = ceil($totalRows_DetailRS1/$maxRows_DetailRS1)-1;
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><!-- InstanceBegin template="/Templates/main1.dwt" codeOutsideHTMLIsLocked="false" -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- InstanceBeginEditable name="doctitle" -->
<title>Upload CV - Southeast Voluntary Services</title>
<!-- InstanceEndEditable -->
<style type="text/css" media="all">
<!--
/* This rule resets a core set of elements so that they will appear consistent across browsers. Without this rule, content styled with an h1 tag, for example, would appear in different places in Firefox and Internet Explorer because each browser has a different top margin default value. By resetting these values to 0, the elements will initially be rendered in an identical fashion and their properties can be easily defined by the designer in any subsequent rule. */
html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6 {
  margin: 0;
  padding: 0;
  border: 0;
  outline: 0;
  font-size: 100%;
}
/* The body is the outermost layout component and contains the visible page content. Setting properties for the body element will help to create consistent styling of the page content and more manageable CSS. Besides using the body element to set global properties, it is common to use the body element to set the background color of the page and create a centered container for the page content to display. */
body {
  background-color: #fff;
  color: #222847;
  font-family: "Palatino Linotype", "Book Antiqua", Palatino, serif;
  font-size: 12px;
  line-height: 16px;
  margin: 0 0 0 0; /* Sets the margin properties for an element using shorthand notation (top, right, bottom, left) */
  padding: 0 0 0 0; /* Sets the padding properties for an element using shorthand notation (top, right, bottom, left) */
  text-align: center; /* Centers the page content container in IE 5 browsers. */
}
/* Commonly used to style page titles. */
h1 {
  color: #fff;
  font-family: "Trebuchet MS", Helvetica, sans-serif;
  font-size: 18px;
  font-weight: bold;
  line-height: 14px;
}
/* Commonly used to style section titles. */
h2 {
  color: #fff;
  font-family: "Trebuchet MS", Helvetica, sans-serif;
  font-size: 16px;
  font-weight: bold;
  line-height: 14px;
}
/* Sets the style for unvisited links. */
a,  a:link {
  color: #003399;
  font-weight: bold;
  text-decoration: none;
}
/* Sets the style for visited links. */
a:visited {
  color: #003399;
  text-decoration: none;
}
/* Sets the style for links on mouseover. */
a:hover {
  color: #003399;
  text-decoration: underline;
}
/* Sets the style for a link that has focus. */
a:focus {
  color: #003399;
}
/* Sets the style for a link that is being activated/clicked. */
a:active {
  color: #003399;
}
/* This is a container for the page content. It is common to use the container to constrain the width of the page content and allow for browser chrome to avoid the need for horizontal scrolling. For fixed layouts you may specify a container width and use auto for the left and right margin to center the container on the page. IE 5 browser require the use of text-align: center defined by the body element to center the container. For liquid layouts you may simply set the left and right margins to center the container on the page. */
#outerWrapper {
  margin: 0 auto 0 auto; /* Sets the margin properties for an element using shorthand notation (top, right, bottom, left) */
  padding-top: 11px;
  text-align: left; /* Redefines the text alignment defined by the body element. */
  width: 900px;
}
#outerWrapper #headerBackground {
	background: url(southeastautosaved_images/header_bg0000B.png) no-repeat bottom;
}
#outerWrapper #headerBackground #headerBottom {
	height: 220px;
	background: url(southeastautosaved_images/header_bottom0000A.png) no-repeat bottom;
}
#outerWrapper #headerBackground #headerBottom #headerTop {
	background-image: url("southeastautosaved_images/header_top0000.png");
	background-repeat: no-repeat;
	color: #fff;
	font-size: 12px;
	font-weight: bold;
	line-height: 15px;
	padding: 93px 28px 28px; /* Sets the padding properties for an element using shorthand notation (top, right, bottom, left) */
}
#outerWrapper #contentWrapper {
  background-image: url("southeastautosaved_images/contentWrapper_bg0000.png");
  background-repeat: repeat-y;
  overflow: hidden;
  padding-left: 14px;
  padding-right: 14px;
}
#outerWrapper #contentWrapper #rightSidebar {
  float: right;
  padding: 14px 14px 14px 14px; /* Sets the padding properties for an element using shorthand notation (top, right, bottom, left) */
  width: 169px;
}
#outerWrapper #contentWrapper #leftSidebar {
	float: left;
	padding: 14px 0px; /* Sets the padding properties for an element using shorthand notation (top, right, bottom, left) */
	width: 195px;
}
/* Contains the main page content. When using a mutliple column layout the margins will be set to account for the floated columns' width, margins, and padding. */
#outerWrapper #contentWrapper #content {
  margin: 0 197px 0px 197px; /* Sets the margin properties for an element using shorthand notation (top, right, bottom, left) */
  padding: 14px 14px 14px 14px; /* Sets the padding properties for an element using shorthand notation (top, right, bottom, left) */
}
#outerWrapper #footerBackground {
  background-image: url("southeastautosaved_images/footer_bg0000.png");
  background-repeat: repeat-y;
}
#outerWrapper #footerBackground #footerBottom {
  background-image: url("southeastautosaved_images/footer_bottom0000.png");
  background-position: bottom;
  background-repeat: no-repeat;
}
#outerWrapper #footerBackground #footerBottom #footerTop {
  background-image: url("southeastautosaved_images/footer_top0000.png");
  background-repeat: no-repeat;
  color: #fff;
  font-size: 12px;
  font-weight: bold;
  line-height: 15px;
  padding: 24px 28px 24px 28px; /* Sets the padding properties for an element using shorthand notation (top, right, bottom, left) */
}
-->
</style>
<style type="text/css" media="print">
<!--
/* It is common to set printer friendly styles such as a white background with black text. */
body {
  background-color: #fff;
  background-image: none;
  border-color: #000; /* Sets the border color properties for an element using shorthand notation */
  color: #000;
}
-->
</style>
<!--[if IE 5]>
<style type="text/css"> 
/* IE 5 does not use the standard box model, so the column widths are overidden to render the page correctly. */
#outerWrapper #contentWrapper #leftSidebar {
  width: 197px;
}
#outerWrapper #contentWrapper #rightSidebar {
  width: 197px;
}
</style>
<![endif]-->
<!--[if IE]>
<style type="text/css"> 
/* The proprietary zoom property gives IE the hasLayout property which addresses several bugs. */
#outerWrapper #contentWrapper, #outerWrapper #contentWrapper #content {
  zoom: 1;
}
</style>
<![endif]-->
<!--[if lt IE 7]>
<style type="text/css"> 
img, div {
  behavior: url("southeastautosaved_images/iepngfix.htc");
}
</style>
<![endif]-->
<script type="text/javascript" src="CSSMenuWriter/cssmw0/menu.js"></script>
<script src="SpryAssets/SpryMenuBar.js" type="text/javascript"></script>
<style type="text/css" media="all">
<!--
@import url("CSSMenuWriter/cssmw0/menu.css");
-->
</style>
<!--[if lte IE 6]>
<style type="text/css" media="all">
@import url("CSSMenuWriter/cssmw0/menu_ie.css");
</style>
 
<![endif]-->
<!-- InstanceBeginEditable name="head" --><!-- InstanceEndEditable -->
<link href="SpryAssets/SpryMenuBarVertical.css" rel="stylesheet" type="text/css" />
<style type="text/css">
<!--
.style1 {
	color: #DF001F;
	font-style: italic;
	font-weight: bold;
}
.style2 {color: #FFFFFF}
-->
</style>
<script src="Scripts/AC_RunActiveContent.js" type="text/javascript"></script>
</head>
 
<body>
 
<div id="outerWrapper">
  <div id="headerBackground">
    <div id="headerBottom"></div>
  </div>
  <div id="contentWrapper">
    <div id="rightSidebar">
<h2 align="center">Most Recent Jobs</h2>
<!-- InstanceBeginEditable name="rightsidebartop" -->
<form id="form1" method="post" action="">
  <?php do { ?>
    <table width="100%" border="0">
      <tr>
        <td width="31%">Title:</td>
          <td width="69%"><?php echo $row_rsCurrent['job_Title']; ?></td>
        </tr>
      <tr>
        <td>Sector:</td>
          <td><?php echo $row_rsCurrent['job_Sector']; ?></td>
        </tr>
      <tr>
        <td>Status:</td>
          <td><?php echo $row_rsCurrent['job_Status']; ?></td>
        </tr>
      <tr>
        <td colspan="2"><div align="center" class="style1">
          <label><a href="detail.php?recordID=<?php echo $row_rsCurrent['jobId']; ?>">View</a></label>
          </div></td>
          </tr>
        </table>
    <?php } while ($row_rsCurrent = mysql_fetch_assoc($rsCurrent)); ?></form>
<!-- InstanceEndEditable -->
<hr />
<!-- InstanceBeginEditable name="rightsidebarbot" -->
<table width="90%" border="0">
  <tr>
    <td colspan="2"><div align="center">
      <h2>Contact Us</h2>
    </div></td>
    </tr>
  <tr>
    <td>Tel:</td>
    <td>&nbsp;020 8855 4441</td>
  </tr>
  <tr>
    <td>Email:</td>
    <td>jobs@sevagency.com</td>
  </tr>
</table>
<p>&nbsp;</p>
<!-- InstanceEndEditable --></div>
    <div id="leftSidebar">
      <ul id="MenuBar1" class="MenuBarVertical">
        <li><a href="default.php">Home</a>          </li>
        <li><a href="about.php">About Us</a></li>
        <li><a href="mission.php">Mission</a>          </li>
    <li><a href="jobmaster.php" class="MenuBarItemSubmenu">Browse for Jobs</a>
            <ul>
              <li><a href="searchjob.php">Job Search</a></li>
              <li><a href="uploadcv.php">Upload CV</a></li>
          </ul>
        </li>
    <li><a href="staff.php" class="MenuBarItemSubmenu">Staff</a>
            <ul>
              <li><a href="newjobs.php">Upload Jobs</a></li>
              <li><a href="jobadmin.php">Update Jobs</a></li>
              <li><a href="newstaff.php">Staff Admin</a></li>
          </ul>
        </li>
        <li><a href="contacts.php">Contact Us</a></li>
      </ul>
      <p align="center">
        <script type="text/javascript">
AC_FL_RunContent( 'codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0','width','180','height','150','title','southeast training centre','src','flash/stc','quality','high','pluginspage','http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash','movie','flash/stc' ); //end AC code
</script><noscript><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" width="180" height="150" title="southeast training centre">
          <param name="movie" value="flash/stc.swf" />
          <param name="quality" value="high" />
          <embed src="flash/stc.swf" quality="high" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="180" height="150"></embed>
        </object></noscript>
      
      <hr />
<p>&nbsp;</p>
    </div>
    <div id="content">
<h1><!-- InstanceBeginEditable name="contentheader" -->Upload your CV<!-- InstanceEndEditable --></h1>
<hr />
<!-- InstanceBeginEditable name="contentmain" -->
<p>Please upload your resume here for which  will be forwarded  to our client and we shall get back to you once the client gets back to us.</p>
<form name="form2" id="form2" method="POST" action="<?php echo $editFormAction; ?>">
  <table width="95%" border="0">
    <tr>
      <td width="36%">Ref: </td>
      <td width="64%">&nbsp;</td>
    </tr>
    <tr>
      <td>First Name :</td>
      <td><label>
        <input type="text" name="firstname" id="firstname" />
      </label></td>
    </tr>
    <tr>
      <td>Last Name :</td>
      <td><label>
        <input type="text" name="lastname" id="lastname" />
      </label></td>
    </tr>
    <tr>
      <td>Date of Birth :</td>
      <td><label>
      <input type="text" name="DOB" id="DOB" />
      </label></td>
    </tr>
    <tr>
      <td>Gender :</td>
      <td><label>
        <select name="gender" id="gender">
        </select>
      </label></td>
    </tr>
    <tr>
      <td>Nationality :</td>
      <td><label>
      <input type="text" name="Nationality" id="Nationality" />
      </label></td>
    </tr>
    <tr>
      <td>:National Insurance No :</td>
      <td><label>
      <input type="text" name="NI" id="NI" />
      </label></td>
    </tr>
    <tr>
      <td>Qualifications:</td>
      <td><label>
      <textarea name="Qualifications" id="Qualifications"></textarea>
      </label></td>
    </tr>
    <tr>
      <td>Employment History :</td>
      <td><label>
        <textarea name="EmploymentHistory" id="EmploymentHistory"></textarea>
      </label></td>
    </tr>
    <tr>
      <td>Email Address :</td>
      <td><label>
        <input type="text" name="email" id="email" />
      </label></td>
    </tr>
    <tr>
      <td>Telephone :</td>
      <td><label>
        <input type="text" name="Telephone" id="Telephone" />
      </label></td>
    </tr>
    <tr>
      <td>References:</td>
      <td><label>
        <textarea name="references" id="references"></textarea>
      </label></td>
    </tr>
    <tr>
      <td>Can we contact your referees before we forward your CV to our client</td>
      <td><label>
      <select name="contactReferences" size="1" id="contactReferences">
      </select>
      </label></td>
    </tr>
    <tr>
      <td>Referees' contact Address (please include contact telephone numbers</td>
      <td><label>
        <textarea name="contactAddress" id="contactAddress"></textarea>
      </label></td>
    </tr>
    <tr>
      <td>Why do you think you are the best candidate for this job?</td>
      <td><label>
        <textarea name="comments" id="comments"></textarea>
      </label></td>
    </tr>
    <tr>
      <td>&nbsp;</td>
      <td><label>
        <input type="submit" name="Submit" id="Submit" value="Send" />
        <input type="reset" name="reset" id="reset" value="Reset" />
      </label></td>
    </tr>
    <tr>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
    </tr>
  </table>
  <input type="hidden" name="MM_insert" value="form2" />
</form>
<p>, </p>
<!-- InstanceEndEditable -->
<p>&nbsp;</p>
    </div>
  </div>
  <div align="center"></div>
  <div id="footerBackground">
    <div id="footerBottom">
      <div id="footerTop">
        <div align="right"><span class="bodwh2">&nbsp;&copy; 2009 Southeast Voluntary Services </span> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="privacy.php"><span class="style2">Privacy</span></a></div>
      </div>
    </div>
  </div>
</div>
 
<script type="text/javascript">
<!--
var MenuBar1 = new Spry.Widget.MenuBar("MenuBar1", {imgRight:"../SpryAssets/SpryMenuBarRightHover.gif"});
//-->
</script>
</body>
<!-- InstanceEnd --></html>
<?php
mysql_free_result($rsCurrent);
 
mysql_free_result($rsJobtitle);
?>
 
<========/end of uploadcv page(form)===============>

Open in new window

Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
i supose that you will have a form and the user will select from a list populated by mysql.

you will have a form and 2 select fileds -
1 . the job id like this

$result=mysql_query("select * from job") ...

$selectjob='<select name=jobid onchange=form.submit()><option>Select Job Type</option>';
// here you will have the results from the database with an if statement to be able to display the selected jobid
while ($row=mysql_fetch_assoc($result)){
$selectjob.='<option value=$row[id]';
$selectjob.=(!empty($_POST['jobid'] and is_numeric($_POST['jobid']) and $_POST['jobid']==$row['id'] ))?" selected":"";
$selectjob.=">$row[job]</option>";
}
$selectjob.="</select>";

like this you will do both selections but from diferent tables -
i supose the second select will show the titles for the selected jobid

so for the second one you have to select from the table where the title fas an idf=jobid


then in the link for the apply you will pas the 2 parameters from the post

Author

Commented:
Thanks racmail2001, but I think this is not what I meant. As stated, in the result page, when the user click the apply button "(which is <a href="uploadcv.php?detail.php?recordID=<?php echo $row_DetailRS1['jobId']; ?>">Apply</a>)"  I want two specified fields (jobId & job_title) on the form in uploadCV.php to inherit values from two fields of the result page.
how you have the 2 parameters in your page?
in your code you have a link with view

instead of that i sugested to make a select list with all the values from a table
Introduction to R

R is considered the predominant language for data scientist and statisticians. Learn how to use R for your own data science projects.

as i sugested you will have

<?php echo"a href=\"uploadcv.php?detail.php?recordID=$row_DetailRS1[jobId]&jobid=$_POST[jobid]&jobtile=$_POST[jobtitle]\">Apply</a>?>";




Author

Commented:
No, this is not the route. This process is completely different from what I want. I appreciate your effort but this is not it.
I want the user to click the apply link in the result page and get the jobId and Job_title values of the result page in the form fields of the linked page (uploadCV.php).
do you have a live example of wat you need? i realy do not understand what you are trying to do

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial