Insert an image from a Database
Hi - I am trying to insert an image from a database into a webpage. Basically when clients register on the site they upload their logo which i want to come up when they look at their account details and when they post a job. When I test the file upload the file name is in an "image" field in my database and the image is in the website files on the server but I am having problems trying to get the logo to shop up on the webpage. I have one table called Recruiters where all the client's contact details (and logo upload goes) and a table called jobs where all the job details go when they post a job (this does not hold the logo upload).
At the moment i am trying to insert the image into the Recruiter account Details page where all the clients contact details are and all this information comes from the Recruiter table (including the image) but the image does not appear. the query in my recordset is:-
SELECT *
FROM recruiters
WHERE RecruiterID = colname
(colname = $_GET['RecruiterID'])
<?php require_once('../Connections/laura.php'); ?>
<?php
//initialize the session
if (!isset($_SESSION)) {
session_start();
// ** Logout the current user. **
$logoutAction = $_SERVER['PHP_SELF']."?doLogout=true";
if ((isset($_SERVER['QUERY_STRING'])) && ($_SERVER['QUERY_STRING'] != "")){
$logoutAction .="&". htmlentities($_SERVER['QUERY_STRING']);
if ((isset($_GET['doLogout'])) &&($_GET['doLogout']=="true")){
//to fully log out a visitor we need to clear the session varialbles
$_SESSION['MM_Username'] = NULL;
$_SESSION['MM_UserGroup'] = NULL;
$_SESSION['PrevUrl'] = NULL;
unset($_SESSION['MM_Username']);
unset($_SESSION['MM_UserGroup']);
unset($_SESSION['PrevUrl']);
$logoutGoTo = "../index.php";
if ($logoutGoTo) {
header("Location: $logoutGoTo");
exit;
?>
<?php
if (!isset($_SESSION)) {
session_start();
$MM_authorizedUsers = "Recruiter";
$MM_donotCheckaccess = "false";
// *** Restrict Access To Page: Grant or deny access to this page
function isAuthorized($strUsers, $strGroups, $UserName, $UserGroup) {
// For security, start by assuming the visitor is NOT authorized.
$isValid = False;
// When a visitor has logged into this site, the Session variable MM_Username set equal to their username.
// Therefore, we know that a user is NOT logged in if that Session variable is blank.
if (!empty($UserName)) {
// Besides being logged in, you may restrict access to only certain users based on an ID established when they login.
// Parse the strings into arrays.
$arrUsers = Explode(",", $strUsers);
$arrGroups = Explode(",", $strGroups);
if (in_array($UserName, $arrUsers)) {
$isValid = true;
// Or, you may restrict access to only certain users based on their username.
if (in_array($UserGroup, $arrGroups)) {
$isValid = true;
if (($strUsers == "") && false) {
$isValid = true;
return $isValid;
$MM_restrictGoTo = "../Unavailablepage.php";
if (!((isset($_SESSION['MM_Username'])) && (isAuthorized("",$MM_authorizedUsers, $_SESSION['MM_Username'], $_SESSION['MM_UserGroup'])))) {
$MM_qsChar = "?";
$MM_referrer = $_SERVER['PHP_SELF'];
if (strpos($MM_restrictGoTo, "?")) $MM_qsChar = "&";
if (isset($_SERVER['QUERY_STRING']) && strlen($_SERVER['QUERY_STRING']) > 0)
$MM_referrer .= "?" . $_SERVER['QUERY_STRING'];
$MM_restrictGoTo = $MM_restrictGoTo. $MM_qsChar . "accesscheck=" . urlencode($MM_referrer);
header("Location: ". $MM_restrictGoTo);
exit;
?>
<?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;
$colname_rsAccountDetails = "-1";
if (isset($_GET['RecruiterID'])) {
$colname_rsAccountDetails = $_GET['RecruiterID'];
mysql_select_db($database_laura, $laura);
$query_rsAccountDetails = sprintf("SELECT * FROM recruiters WHERE RecruiterID = %s", GetSQLValueString($colname_rsAccountDetails, "int"));
$rsAccountDetails = mysql_query($query_rsAccountDetails, $laura) or die(mysql_error());
$row_rsAccountDetails = mysql_fetch_assoc($rsAccountDetails);
$totalRows_rsAccountDetails = mysql_num_rows($rsAccountDetails);
?>
<!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>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Nursery and Childcare Jobs in the UK</title>
<link href="../CSS/Global.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" />
<link href="../SpryAssets/SpryMenuBarVertical.css" rel="stylesheet" type="text/css" />
<!-- google adwords -->
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-6435415-4']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
</script>
</head>
<body>
<div class="container">
<div class="header"><!-- end .header --><a href="../index.php"><img src="../Images/Logo.png" width="900" height="200" alt="Logo" /></a></div>
<ul id="MenuBar1" class="MenuBarHorizontal">
<li><a href="../index.php">Home</a> </li>
<li><a href="#" class="MenuBarItemSubmenu">Recruiters</a>
<ul>
<li><a href="recruiterbenefits.php">Benefits</a></li>
<li><a href="recruiterfees.php">Fees</a></li>
<li><a href="recreg.php">Register</a></li>
<li><a href="reclogin.php">Login </a></li>
</ul>
</li>
<li><a class="MenuBarItemSubmenu" href="#">Jobseekers</a>
<ul>
<li><a href="../Jobseekerarea/jobseekerbenefits.php">Benefits</a> </li>
<li><a href="../Jobseekerarea/jobseekerreg1.php">Register</a></li>
<li><a href="../Jobseekerarea/jslogin.php">Login</a></li>
</ul>
</li>
<li><a href="../contactus.php">Contact Us</a></li>
</ul>
<div class="sidebar1">
<p> </p>
<div class="recruitsidebar">
<ul id="MenuBar2" class="MenuBarVertical">
<li><a href="postajob.php">Post a Job</a></li>
<li><a href="recruiterjobs1.php">My Jobs</a></li>
<li><a href="recAccdetails.php?RecruiterID=<?php echo $row_rsAccountDetails['RecruiterID']; ?>">My Details</a></li>
<li><a href="Saferrecruitment.php">Safer Recruitment</a></li>
<li><a href="Interview1.php" class="MenuBarItemSubmenu">Interviewing Staff</a>
<ul>
<li><a href="recInterviewquestions.php">Nursery Staff Interview Questions</a></li>
</ul>
</li>
<li><a href="Nurseryjobsdescriptions.php">Nursery Job Descriptions</a></li>
<li><a href="recruiterarea.php">Recruiter Home</a></li>
<li><a href="<?php echo $logoutAction ?>">Log Out</a></li>
</ul>
<p> </p>
</div>
</div>
<div class="content">
<h1>Account Details</h1>
<p>Below are the details you have provided us with about your nursery/setting.</p>
<p> </p>
<form id="accountdetailsform" name="accountdetailsform" method="post" action="recUpdate.php?RecruiterID=<?php echo $row_rsAccountDetails['RecruiterID']; ?>">
<table width="580" border="0" cellpadding="3" cellspacing="3" id="accountdetails">
<tr>
<td width="212" scope="col">Nursery/Setting Name</td>
<td width="347" scope="col"><?php echo $row_rsAccountDetails['client']; ?></td>
</tr>
<tr>
<td>Contact Name</td>
<td><?php echo $row_rsAccountDetails['contactname']; ?></td>
</tr>
<tr>
<td>Setting Type</td>
<td><?php echo $row_rsAccountDetails['settingtype']; ?></td>
</tr>
<tr>
<td>Nursery/Setting</td>
<td><?php echo $row_rsAccountDetails['Setting']; ?></td>
</tr>
<tr>
<td>Building Name/Number</td>
<td><?php echo $row_rsAccountDetails['buildingnumber']; ?></td>
</tr>
<tr>
<td>Street Name</td>
<td><?php echo $row_rsAccountDetails['streetname']; ?></td>
</tr>
<tr>
<td>Address</td>
<td><?php echo $row_rsAccountDetails['address3']; ?></td>
</tr>
<tr>
<td>Town/City</td>
<td><?php echo $row_rsAccountDetails['town']; ?></td>
</tr>
<tr>
<td>Post Code</td>
<td><?php echo $row_rsAccountDetails['postcode']; ?></td>
</tr>
<tr>
<td>Region</td>
<td><?php echo $row_rsAccountDetails['region']; ?></td>
</tr>
<tr>
<td>Telephone</td>
<td><?php echo $row_rsAccountDetails['telephone']; ?></td>
</tr>
<tr>
<td>Email</td>
<td><?php echo $row_rsAccountDetails['email']; ?></td>
</tr>
<tr>
<td>Website</td>
<td><?php echo $row_rsAccountDetails['WebAddress']; ?></td>
</tr>
<tr>
<td>Password</td>
<td> </td>
</tr>
<tr>
<td>Logo</td>
<td><img src="<?php echo $row_rsAccountDetails['Image']; ?>" alt="Logo" /></td>
</tr>
<tr>
<td>Date Registered</td>
<td><?php echo $row_rsAccountDetails['dateregistered']; ?></td>
</tr>
</table>
<p>
<input name="hiddenField" type="hidden" id="hiddenField" value="<?php echo $row_rsAccountDetails['RecruiterID']; ?>" />
</p>
<p>
<input type="submit" name="Update" id="Update" value="Update Details" />
</p>
<p> </p>
</form>
<p> </p>
<table width="600" border="0" cellpadding="3" cellspacing="3" class="postform">
<tr> </tr>
<tr> </tr>
<tr> </tr>
</table>
<p> </p>
<p> </p>
</div>
<div class="sidebar2">
<h4> </h4>
<!-- end .sidebar2 --></div>
<div class="footer">
<p><a href="../index.php">Home</a> | <a href="../contactus.php">Contact us</a> | <a href="../PrivacyPolicy.php">Privacy</a> | <a href="../termsandconditions.php">Terms of Business</a></p>
<p>© theNurseryJobSite.com 2011</p>
<!-- end .footer --></div>
<!-- end .container --></div>
<script type="text/javascript">
var MenuBar1 = new Spry.Widget.MenuBar("MenuBar1", {imgDown:"SpryAssets/SpryMenuBarDownHover.gif", imgRight:"SpryAssets/SpryMenuBarRightHover.gif"});
var MenuBar2 = new Spry.Widget.MenuBar("MenuBar2", {imgRight:"../SpryAssets/SpryMenuBarRightHover.gif"});
</script>
</body>
</html>
<?php
mysql_free_result($rsAccountDetails);
?>
Hi
You were right – I had to insert full path and it has worked so thanks.
Would you be able to help me out with inserting the logo into a job post page and the recordset I will need to insert the logo?
Basically I want to add the logo that is uploaded when a client registers on the site onto a job info page. To access the the details about a job, jobseekers just click on the job that interests them which takes them to the job details page which pulls all the information from the "Job" table in the database. However, the logo is stored in the "image" field in the "Recruiter" table in the database. I have tried setting up a recordset as:-
SELECT Image
FROM recruiters
WHERE RecruiterID = colname
(colname = $_GET['RecruiterID'])
<?php require_once('../Connections/laura.php'); ?>
<?php
//initialize the session
if (!isset($_SESSION)) {
session_start();
// ** Logout the current user. **
$logoutAction = $_SERVER['PHP_SELF']."?doLogout=true";
if ((isset($_SERVER['QUERY_STRING'])) && ($_SERVER['QUERY_STRING'] != "")){
$logoutAction .="&". htmlentities($_SERVER['QUERY_STRING']);
if ((isset($_GET['doLogout'])) &&($_GET['doLogout']=="true")){
//to fully log out a visitor we need to clear the session varialbles
$_SESSION['MM_Username'] = NULL;
$_SESSION['MM_UserGroup'] = NULL;
$_SESSION['PrevUrl'] = NULL;
unset($_SESSION['MM_Username']);
unset($_SESSION['MM_UserGroup']);
unset($_SESSION['PrevUrl']);
$logoutGoTo = "../index.php";
if ($logoutGoTo) {
header("Location: $logoutGoTo");
exit;
?>
<?php
if (!isset($_SESSION)) {
session_start();
$MM_authorizedUsers = "Recruiter";
$MM_donotCheckaccess = "false";
// *** Restrict Access To Page: Grant or deny access to this page
function isAuthorized($strUsers, $strGroups, $UserName, $UserGroup) {
// For security, start by assuming the visitor is NOT authorized.
$isValid = False;
// When a visitor has logged into this site, the Session variable MM_Username set equal to their username.
// Therefore, we know that a user is NOT logged in if that Session variable is blank.
if (!empty($UserName)) {
// Besides being logged in, you may restrict access to only certain users based on an ID established when they login.
// Parse the strings into arrays.
$arrUsers = Explode(",", $strUsers);
$arrGroups = Explode(",", $strGroups);
if (in_array($UserName, $arrUsers)) {
$isValid = true;
// Or, you may restrict access to only certain users based on their username.
if (in_array($UserGroup, $arrGroups)) {
$isValid = true;
if (($strUsers == "") && false) {
$isValid = true;
return $isValid;
$MM_restrictGoTo = "../Unavailablepage.php";
if (!((isset($_SESSION['MM_Username'])) && (isAuthorized("",$MM_authorizedUsers, $_SESSION['MM_Username'], $_SESSION['MM_UserGroup'])))) {
$MM_qsChar = "?";
$MM_referrer = $_SERVER['PHP_SELF'];
if (strpos($MM_restrictGoTo, "?")) $MM_qsChar = "&";
if (isset($_SERVER['QUERY_STRING']) && strlen($_SERVER['QUERY_STRING']) > 0)
$MM_referrer .= "?" . $_SERVER['QUERY_STRING'];
$MM_restrictGoTo = $MM_restrictGoTo. $MM_qsChar . "accesscheck=" . urlencode($MM_referrer);
header("Location: ". $MM_restrictGoTo);
exit;
?>
<?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;
$colname_rsDetails = "-1";
if (isset($_GET['JobID'])) {
$colname_rsDetails = $_GET['JobID'];
mysql_select_db($database_laura, $laura);
$query_rsDetails = sprintf("SELECT * FROM jobs WHERE JobID = %s", GetSQLValueString($colname_rsDetails, "text"));
$rsDetails = mysql_query($query_rsDetails, $laura) or die(mysql_error());
$row_rsDetails = mysql_fetch_assoc($rsDetails);
$totalRows_rsDetails = "-1";
if (isset($_GET['JobID'])) {
$totalRows_rsDetails = $_GET['JobID'];
mysql_select_db($database_laura, $laura);
$query_rsDetails = sprintf("SELECT recruiters.Image, jobs.JobID, jobs.RecruiterID, jobs.jobtitle, jobs.`Position`, jobs.Nursery, jobs.branchlocation, jobs.ContactName, jobs.JobDescription, jobs.Location, jobs.town, jobs.employmenttype, jobs.Hours, jobs.qualifications, jobs.Salary, jobs.ContactNo, jobs.Email, jobs.dateposted FROM jobs, recruiters WHERE JobID = %s", GetSQLValueString($colname_rsDetails, "int"));
$rsDetails = mysql_query($query_rsDetails, $laura) or die(mysql_error());
$row_rsDetails = mysql_fetch_assoc($rsDetails);
$totalRows_rsDetails = "-1";
if (isset($_GET['JobID'])) {
$totalRows_rsDetails = $_GET['JobID'];
mysql_select_db($database_laura, $laura);
$query_rsDetails = sprintf("SELECT recruiters.Image, jobs.JobID, jobs.RecruiterID, jobs.jobtitle, jobs.`Position`, jobs.Nursery, jobs.branchlocation, jobs.ContactName, jobs.JobDescription, jobs.Location, jobs.town, jobs.employmenttype, jobs.Hours, jobs.qualifications, jobs.Salary, jobs.ContactNo, jobs.Email, jobs.dateposted FROM jobs, recruiters WHERE JobID = %s", GetSQLValueString($colname_rsDetails, "int"));
$rsDetails = mysql_query($query_rsDetails, $laura) or die(mysql_error());
$row_rsDetails = mysql_fetch_assoc($rsDetails);
$totalRows_rsDetails = "-1";
if (isset($_GET['JobID'])) {
$totalRows_rsDetails = $_GET['JobID'];
mysql_select_db($database_laura, $laura);
$query_rsDetails = sprintf("SELECT recruiters.Image, jobs.JobID, jobs.RecruiterID, jobs.jobtitle, jobs.`Position`, jobs.Nursery, jobs.branchlocation, jobs.ContactName, jobs.JobDescription, jobs.Location, jobs.town, jobs.employmenttype, jobs.Hours, jobs.qualifications, jobs.Salary, jobs.ContactNo, jobs.Email, jobs.dateposted FROM jobs, recruiters WHERE JobID = %s", GetSQLValueString($totalRows_rsDetails, "int"));
$rsDetails = mysql_query($query_rsDetails, $laura) or die(mysql_error());
$row_rsDetails = mysql_fetch_assoc($rsDetails);
$totalRows_rsDetails = mysql_num_rows($rsDetails);
$colname_rsRecruiterID2 = "-1";
if (isset($_GET['RecruiterID'])) {
$colname_rsRecruiterID2 = $_GET['RecruiterID'];
mysql_select_db($database_laura, $laura);
$query_rsRecruiterID2 = sprintf("SELECT RecruiterID FROM recruiters WHERE RecruiterID = %s", GetSQLValueString($colname_rsRecruiterID2, "int"));
$rsRecruiterID2 = mysql_query($query_rsRecruiterID2, $laura) or die(mysql_error());
$row_rsRecruiterID2 = mysql_fetch_assoc($rsRecruiterID2);
$totalRows_rsRecruiterID2 = mysql_num_rows($rsRecruiterID2);
$colname_rsRecruiterID = "-1";
if (isset($_SESSION['MM_Username'])) {
$colname_rsRecruiterID = $_SESSION['MM_Username'];
mysql_select_db($database_laura, $laura);
$query_rsRecruiterID = sprintf("SELECT RecruiterID FROM recruiters WHERE email = %s", GetSQLValueString($colname_rsRecruiterID, "text"));
$rsRecruiterID = mysql_query($query_rsRecruiterID, $laura) or die(mysql_error());
$row_rsRecruiterID = mysql_fetch_assoc($rsRecruiterID);
$totalRows_rsRecruiterID = mysql_num_rows($rsRecruiterID);
$colname_Recordset1 = "-1";
if (isset($_GET['RecruiterID'])) {
$colname_Recordset1 = $_GET['RecruiterID'];
mysql_select_db($database_laura, $laura);
$query_Recordset1 = sprintf("SELECT Image FROM recruiters WHERE RecruiterID = %s", GetSQLValueString($colname_Recordset1, "int"));
$Recordset1 = mysql_query($query_Recordset1, $laura) or die(mysql_error());
$row_Recordset1 = mysql_fetch_assoc($Recordset1);
$totalRows_Recordset1 = mysql_num_rows($Recordset1);
$query_rsJobs = "SELECT * FROM jobs";
$rsJobs = mysql_query($query_rsJobs, $laura) or die(mysql_error());
$row_rsJobs = mysql_fetch_assoc($rsJobs);
$totalRows_rsJobs = mysql_num_rows($rsJobs);
$colname_rsJobs = "-1";
if (isset($_GET['Position'])) {
$colname_rsJobs = $_GET['Position'];
$varLocation_rsJobs = "-1";
if (isset($_GET['Location'])) {
$varLocation_rsJobs = $_GET['Location'];
mysql_select_db($database_laura, $laura);
$query_rsJobs = sprintf("SELECT `Position`, Nursery, Location, Salary, Email, ContactNo, JobDescription, JobID FROM jobs WHERE `Position` = %s AND jobs.Location = %s", GetSQLValueString($colname_rsJobs, "text"),GetSQLValueString($varLocation_rsJobs, "text"));
$rsJobs = mysql_query($query_rsJobs, $laura) or die(mysql_error());
$row_rsJobs = mysql_fetch_assoc($rsJobs);
?>
<!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>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Nursery and Childcare Jobs in the UK</title>
<link href="../CSS/Global.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" />
<link href="../SpryAssets/SpryMenuBarVertical.css" rel="stylesheet" type="text/css" />
<!-- google adwards -->
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-6435415-4']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
</script>
</head>
<body>
<div class="container">
<div class="header"><!-- end .header --><a href="../index.php"><img src="../Images/Logo.png" width="900" height="200" alt="the Nursery Job Site" /></a></div>
<div class="navbar"> <ul id="MenuBar1" class="MenuBarHorizontal">
<li><a href="thenurseryjobsite.php">About the Nursery Job Site</a> </li>
<li><a href="#" class="MenuBarItemSubmenu">Recruiters</a>
<ul>
<li><a href="Recruiterarea/recruiterbenefits.php">Benefits</a></li>
<li><a href="Recruiterarea/recruiterfees.php">Fees</a></li>
<li><a href="Recruiterarea/reclogin.php">Login</a></li>
<li><a href="Recruiterarea/recreg.php">Register</a></li>
</ul>
</li>
<li><a class="MenuBarItemSubmenu" href="#">Jobseekers</a>
<ul>
<li><a href="Jobseekerarea/jobseekerbenefits.php">Benefits</a> </li>
<li><a href="Jobseekerarea/jslogin.php">Login</a></li>
<li><a href="Jobseekerarea/jobseekerreg1.php">Register</a></li>
</ul>
</li>
<li><a href="contactus.php">Contact Us</a></li>
</ul> </div> <!--end navbar div -->
<div class="sidebar1">
<p> </p>
<div class="recruitsidebar">
<ul id="MenuBar2" class="MenuBarVertical">
<li><a href="postajob.php">Post a Job</a></li>
<li><a href="recAccdetails.php?RecruiterID=<?php echo $row_rsRecruiterID['RecruiterID']; ?>">My Details </a></li>
<li><a href="recruiterjobs1.php">My Jobs</a></li>
<li><a href="Saferrecruitment.php">Safer Recruitment</a></li>
<li><a href="Interview1.php" class="MenuBarItemSubmenu">Interviewing Staff</a>
<ul>
<li><a href="recInterviewquestions.php">Nursery Staff Interview Questions</a></li>
</ul>
</li>
<li><a href="Nurseryjobsdescriptions.php">Nursery Job Descriptions</a></li>
<li><a href="recruiterarea.php">Recruiter Home</a></li>
<li><a href="<?php echo $logoutAction ?>">Log Out</a></li>
</ul>
<p> </p>
</div>
</div>
<div class="content">
<h1> </h1>
<div class="detailheading" id="detailheading">
<h1> </h1>
<table width="564" border="0" align="center" cellpadding="3" cellspacing="3" id="headingtable">
<tr>
<td width="89" height="44" align="center" class="headertext"><h1>Nursery:</h1></td>
<td width="283" class="headertext"><?php echo $row_rsDetails['Nursery']; ?></td>
<td width="162" rowspan="2"><img src="<?php echo $row_Recordset1['Image']; ?>" alt="" name="nurserylogo" align="right" id="nurserylogo" /></td>
</tr>
<tr align="left" class="headertext">
<td width="89" height="44" align="center"><h1 class="headertext">Job Title:</h1></td>
<td align="left"><?php echo $row_rsDetails['jobtitle']; ?></td>
</tr>
</table>
<p> </p>
</div>
<table width="568" border="0" align="center" cellpadding="3" cellspacing="3" class="detail" id="detailtable">
<tr>
<td width="162" scope="col">Job Title</td>
<td width="381" scope="col"><?php echo $row_rsDetails['jobtitle']; ?></td>
</tr>
<tr>
<td>Nursery</td>
<td><?php echo $row_rsDetails['Nursery']; ?></td>
</tr>
<tr>
<td>Branch Name/Location</td>
<td><?php echo $row_rsDetails['branchlocation']; ?></td>
</tr>
<tr>
<td>Location</td>
<td><?php echo $row_rsDetails['Location']; ?>,<?php echo $row_rsDetails['town']; ?></td>
</tr>
<tr>
<td valign="top">Job Description</td>
<td><p> </p>
<p><?php echo $row_rsDetails['JobDescription']; ?></p>
<p> </p></td>
</tr>
<tr>
<td>Qualifications Required</td>
<td><?php echo $row_rsDetails['qualifications']; ?></td>
</tr>
<tr>
<td>Employment Type</td>
<td><?php echo $row_rsDetails['employmenttype']; ?></td>
</tr>
<tr>
<td>Hours</td>
<td><?php echo $row_rsDetails['Hours']; ?></td>
</tr>
<tr>
<td>Salary</td>
<td>£<?php echo $row_rsDetails['Salary']; ?></td>
</tr>
<tr>
<td>Contact Number</td>
<td><?php echo $row_rsDetails['ContactNo']; ?></td>
</tr>
<tr>
<td>Email</td>
<td><?php echo $row_rsDetails['Email']; ?></td>
</tr>
<tr>
<td>Date Posted</td>
<td><?php echo $row_rsDetails['dateposted']; ?></td>
</tr>
<tr>
<td>Job ID</td>
<td><?php echo $row_rsDetails['JobID']; ?></td>
</tr>
</table>
<p><br />
</p>
<form id="recruiterjobsform" name="recruiterjobsform" method="post" action="recruiterjobs1.php">
<input name="RecruiterIDjobs" type="hidden" id="RecruiterIDjobs" value="<?php echo $row_rsDetails['RecruiterID']; ?>" />
<input type="submit" name="button" id="button" value="return to my jobs" />
</form>
<p> </p>
<script type="text/javascript">
var MenuBar2 = new Spry.Widget.MenuBar("MenuBar2", {imgRight:"../SpryAssets/SpryMenuBarRightHover.gif"});
</script><script type="text/javascript">
var MenuBar1 = new Spry.Widget.MenuBar("MenuBar1", {imgDown:"SpryAssets/SpryMenuBarDownHover.gif", imgRight:"SpryAssets/SpryMenuBarRightHover.gif"});
var MenuBar2 = new Spry.Widget.MenuBar("MenuBar2", {imgRight:"../SpryAssets/SpryMenuBarRightHover.gif"});
</script>
<p> </p>
</div>
<div class="sidebar2">
<h4> </h4>
<!-- end .sidebar2 --></div>
<div class="footer">
<p><a href="../index.php">Home</a> | <a href="../contactus.php">Contact us</a> | <a href="../PrivacyPolicy.php">Privacy</a> | <a href="../termsandconditions.php">Terms of Business</a></p>
<p>© theNurseryJobSite.com 2011</p>
<!-- end .footer --></div>
<!-- end .container --></div>
<script type="text/javascript">
var MenuBar1 = new Spry.Widget.MenuBar("MenuBar1", {imgDown:"SpryAssets/SpryMenuBarDownHover.gif", imgRight:"SpryAssets/SpryMenuBarRightHover.gif"});
var MenuBar2 = new Spry.Widget.MenuBar("MenuBar2", {imgRight:"../SpryAssets/SpryMenuBarRightHover.gif"});
</script>
</body>
</html>
<?php
mysql_free_result($rsDetails);
mysql_free_result($rsRecruiterID2);
mysql_free_result($rsRecruiterID);
mysql_free_result($Recordset1);
?>
Similar Messages
-
How to insert, select image from database
can any one help me to store and retrive image from mySQL database....
plz can any one send me code for this ?
thank youFirst of all, I suggest not to do this!! Creates to much overhead on your database. Especially if you have large images that your going to put in the database.
Otherwise what you could do is create a BLOB that contains the bytes to your image and insert that into your database. -
How do i store and fetch image from the Database(Access)
i am facing one problem in inserting the image into the database.the steps i followed as
1)i have created one database(access) as "Image" and into that one table as "Image" and field as "image"
type of the field is ole object.
2)i have inserted one image into the image field through "database.vi"
3)now i am trying to get the image from the database by "Fetching Example.vi"
4)it will succesfully retrieve the image from that field .
5)but when i close the both programs and reopen those that time i am unable to get retrieve the image.
Attachments:
Add_to_Database.vi 78 KB
Fetch_from_database.vi 67 KBI would like to suggest different approach for saving the images in the database.
I was working on Medical Imaging Company. The way we save the images in real-time was by writing the name and path of the images to database.
The images themselves where saved directly to disk.
I don�t think that access is very good in taking care of GBytes of data.
It happens some time that the database gets damage. If you have the images separately you can create fix procedure. (We had one).
Good Lack,
Amit Shachaf, -
Inserting an image from an URL in a BLOB
Hello all,
As it's said in the title, I need a PL/SQL procedure to insert a image from web URL in a BLOB table column.
How can I do that?
Thanks in advance for your help.
Maxfound this on the internet http://www.oracle-base.com/articles/misc/RetrievingHTMLandBinariesIntoTablesOverHTTP.php
CREATE TABLE http_blob_test (
id NUMBER(10),
url VARCHAR2(255),
data BLOB,
CONSTRAINT http_blob_test_pk PRIMARY KEY (id)
CREATE SEQUENCE http_blob_test_seq;
CREATE OR REPLACE PROCEDURE load_binary_from_url (p_url IN VARCHAR2) AS
l_http_request UTL_HTTP.req;
l_http_response UTL_HTTP.resp;
l_blob BLOB;
l_raw RAW(32767);
BEGIN
-- Initialize the BLOB.
DBMS_LOB.createtemporary(l_blob, FALSE);
-- Make a HTTP request and get the response.
l_http_request := UTL_HTTP.begin_request(p_url);
l_http_response := UTL_HTTP.get_response(l_http_request);
-- Copy the response into the BLOB.
BEGIN
LOOP
UTL_HTTP.read_raw(l_http_response, l_raw, 32767);
DBMS_LOB.writeappend (l_blob, UTL_RAW.length(l_raw), l_raw);
END LOOP;
EXCEPTION
WHEN UTL_HTTP.end_of_body THEN
UTL_HTTP.end_response(l_http_response);
END;
-- Insert the data into the table.
INSERT INTO http_blob_test (id, url, data)
VALUES (http_blob_test_seq.NEXTVAL, p_url, l_blob);
-- Relase the resources associated with the temporary LOB.
DBMS_LOB.freetemporary(l_blob);
EXCEPTION
WHEN OTHERS THEN
UTL_HTTP.end_response(l_http_response);
DBMS_LOB.freetemporary(l_blob);
RAISE;
END load_binary_from_url;
EXEC load_binary_from_url('http://forums.oracle.com/forums/themes/english/resources/oralogo_small.gif'); -
How to insert cropped images from photoshop without the white background
Basically all I want to do is take a peice of writing from a video and insert it into another video. To do this I've took a screenshot of the font from the video and imported it into photoshop. I've then cropped/cut/took the the peice of writing I want, letter by letter. I want to be able to insert it into another video, but whenever I attempt to do it, I have the default white background of photoshop. Is there anyway to insert an image from photoshop, without taking the background with it, or even insert a layer from photoshop straight into final cut pro? Sorry if this is confusing.
I don't think so. I cropped the letters, put them each an individual file, removed the background, saved them as a TIF then tried to import them onto Final Cut Pro, but a white background still appeared in the TIF file. Basically I just want to make the background transparent I believe.
-
Can BI Publisher read the images from the Database?
Hi All,
Can BI Publisher read the images from the Database?
if yes how it can be achieved?
Thanks
AravindHi,
There is an example in oracle db. Use the schema PM (Print Media).
Select the corresponding table that contains the column AD_PHOTO.
In your RTF template simply to print the image stored in the db use:
<fo:instream-foreign-object content-type="image/jpg"> <xsl:value-of select="AD_PHOTO"/>
</fo:instream-foreign-object>
RUn the RTF template and it should show you all.
Cheers
Jorge
p.s. If this answers your question then please grant the points and close the thread -
How to insert a dynamic image from a database
I've recently started using Dreamweaver CC to set up a Dynamic Website (PHP pages with a mySQL database). With perseverance and by downloading the new depreciated Server Behaviors and Bindings Panels I've been more or less successful at accomplishing my tasks. I'm still struggling with getting a image to display from mySQL server data base. In the Pre CC revisions this was easy and well documented. I've downloaded the DMXZone HTML5 Data Bindings extension. I can almost get accomplish my dynamic image task, but the DMXZone HTML5 Data Bindings extension says I must now get the the "unfinished but working on" DMX Zone Database Extension in addition to the HTML5 Data Bindings Extension to select my data source from the database.
I'm thinking about dumping Dreamweaver CC altogether and just installing CS6 until the path gets better paved. Any other ideas? Sample code? Work around? Thanks in advanceKevinatCirris wrote:
I've recently started using Dreamweaver CC to set up a Dynamic Website (PHP pages with a mySQL database). With perseverance and by downloading the new depreciated Server Behaviors and Bindings Panels I've been more or less successful at accomplishing my tasks. I'm still struggling with getting a image to display from mySQL server data base. In the Pre CC revisions this was easy and well documented. I've downloaded the DMXZone HTML5 Data Bindings extension. I can almost get accomplish my dynamic image task, but the DMXZone HTML5 Data Bindings extension says I must now get the the "unfinished but working on" DMX Zone Database Extension in addition to the HTML5 Data Bindings Extension to select my data source from the database.
I'm thinking about dumping Dreamweaver CC altogether and just installing CS6 until the path gets better paved. Any other ideas? Sample code? Work around? Thanks in advance
Really you would do it like any other piece of information in your database.
Store the actual images in a folder on your server and the image file name in the database - myImage.jpg
Then echo it to the page following the convention of your other data which is being echoed onto the page:
<img scr="images/<?php echo $row_rsRecordSetName['images']; ?> alt="" >
['images'] above being the name of the database field in which you stored the image name and $row_rsRecordSetName being the variable created by the recordset (yours will be different) -
Inserting Multiple Images into oracle database using JDBC
I wanted to insert multiple images into database using JDBC by reading it from the file... and i am passing photos.txt(my text file) as an input parameter... I have inserted all the values into the database except for the image part... this is my content of photos.txt file and i have copied all the images into the folder
*" C:\\photos "*
*1,in1.jpg,108,19,in-n-out*
*2,in2.jpg,187,21,in-n-out*
*3,in3.jpg,308,41,in-n-out*
*4,in4.jpg,477,52,in-n-out*
*5,in5.jpg,530,50,in-n-out*
and i want to store in1.jpg,in2.jpg,in3.jpg,in4.jpg,in5.jpg into the oracle databse using JDBC.... i have tried a lot using BLOB column.... and i have created my table as
CREATE TABLE PHOTO(
ID NUMBER NOT NULL PRIMARY KEY ,
Name BLOB,
X DOUBLE PRECISION,
Y DOUBLE PRECISION,
Tags VARCHAR2(40)
try { // for restaurant System.out.println();System.out.println();System.out.println(); System.out.print(" Creating Statement for Photo...\n"); stmt2 = con.createStatement (); stmt2.executeUpdate("delete from PHOTO"); stmt2.executeUpdate("commit"); PreparedStatement stmt3 = con.prepareStatement ("INSERT INTO PHOTO VALUES (?, ?, ?, ?, ?)"); System.out.print(" Create FileReader Object for file: " + inputFileName1 + "...\n"); FileReader inputFileReader2 = new FileReader(inputFileName1); System.out.print(" Create BufferedReader Object for FileReader Object...\n"); BufferedReader inputStream2 = new BufferedReader(inputFileReader2); String inLine2 = null; String[] tokens; // String[] imageFilenames = {"c:\\photos\\in1.jpg","c:\\photos\\in2.jpg","c:\\photos\\in3.jpg","c:\\photos\\in4.jpg","c:\\photos\\in5.jpg", // "c:\\photos\\in6.jpg","c:\\photos\\in7.jpg","c:\\photos\\in8.jpg","c:\\photos\\in9.jpg","c:\\photos\\in10.jpg","c:\\photos\\arb1.jpg","c:\\photos\\arb2.jpg", // "c:\\photos\\arb3.jpg","c:\\photos\\arb4.jpg","c:\\photos\\arb5.jpg","c:\\photos\\den1.jpg","c:\\photos\\den2.jpg","c:\\photos\\den3.jpg", // "c:\\photos\\den4.jpg","c:\\photos\\den5.jpg","c:\\photos\\hop1.jpg","c:\\photos\\hop2.jpg","c:\\photos\\hop3.jpg","c:\\photos\\hop4.jpg","c:\\photos\\hop5.jpg"}; File file = new File("C:\\photos\\in1.jpg"); \\ ( Just for example ) FileInputStream fs = new FileInputStream(file); while ((inLine2 = inputStream2.readLine()) != null) { tokens= inLine2.split(","); st2 = new StringTokenizer(inLine2, DELIM); stmt3.setString(1, tokens[0]); stmt3.setBinaryStream(2, fs, (int)(file.length())); stmt3.setString(3, tokens[2]); stmt3.setString(4, tokens[3]); stmt3.setString(5, tokens[4]); stmt3.execute(); //execute the prepared statement stmt3.clearParameters();
As i am able to enter one image file by above code in1.jpg in to the oracle database.... but i am not able to insert all the image file in to the database.....do tell me what should i do.... and can you give me the example on the basis of the above code of mine...
do reply as soon as possible..jwenting wrote:
that depends. Putting the images in BLOBs prevents the file locations stored in the database from getting out of synch with the filesystem when sysadmins decide to reorganise directory structures or "archive" "old" files that noone uses anyway.True, but it really comes down to a business decision (cost-benefit analysis). If you have the bucks, the expertise, and the time, go with the Blobs, otherwise go with the flat files. -
Display Image from the database but prevent it from refreshing on every pages
Hi there,
I can see there are many discussions around this but my query is slightly different. I'm writing this on behalf of one of my developers. (sorry for my ignorance on techie stuff.. :-))
A logo is being displayed on a few pages, which is called from the database. However, the problem is that - this logo refreshes every time when you traverse to each page causing a performance issue or sometimes slow loading of the image.
My question is - how do we stop it from loading on each page from the database?. I would rather load once when the main page loads initially and then maintain this on other pages too.
We can keep this logo on a file system (FS) and display it via CSS/HTML/frame but since we want to keep it flexible/dynamic where a user can upload a new one whenever it changes and hence DB seems to be the suitable option (in my opinion).
Can someone please help?
If you need any further info around the coding how it is being done at present, pls let me know.
Thank youread this http://docs.oracle.com/cd/B28359_01/appdev.111/b28393/adlob_tables.htm#g1017777
you can cache lobs in the database too
you can also upload the pic in your file system using utl_file package and then put the image in the working directory mentioned in i.war
you can then reference the image and it will not be stored in the database and will be cached
Regards,
Vishal
Oracle APEX 4.2 Reporting | Packt Publishing
Vishal's blog -
How can i retrive image from sql database
hi
i have a problem.i want to retrive image stored in a table in binary form.how can i retrive the image from the table and show it in my page how can i do this? i have a sql database.plz help me out....hi
my java file has compiled now i have made these changes plz see
public InputStream getBinaryStream(String colname) throws Exception
return rs.getBinaryStream(colname);
public boolean GetSig() throws Exception
boolean b=false;
try
ps=myConn.prepareStatement("Select Sign from Signatures where Accode='1201780000000083' ");
rs=ps.executeQuery();
b=true;
catch(Exception e)
System.out.println("This is the problem"+e);
return b;
// now how can i get it in my jsp page and disply the image in my page i am writing this code in the jsp file
SIGN.makeConnection();
if(SIGN.GetSig())
while(SIGN.getNext())
Stream Signatures=SIGN.getBinaryStream("Sign");
System.out.println("Signatures is"+Signatures);
%>
<%=Signatures%>
<% }
SIGN.takeDown();
%>
this error is coming in the browser
org.apache.jasper.JasperException: Unable to compile class for JSPD:\jakarta-tomcat-3.2.2\work\localhost_8080%2Fbackoffice\_0002fcdsl_0002fsignatures_0002ejspsignatures_jsp_0.java:96: Class cdsl.Stream not found.
Stream Signatures=SIGN.getBinaryStream("Sign");
plz see...i am waiting for reply -
Load image from SQL database with ASP?
Hello,
Does anyone know a tutorial where you can load an image from
a SQL database ?
I would like to show this image in Flash, but i don't know
how to load in from a SQL database using ASP.
Regards,
MichealFlash cannot load images from an SQL database.
Flash can load JPEG, PNG, GIF, SWF, MP3, and FLV files.
An SQL database can be used to store the file names and their
location. ASP can retrieve that data from the SQL and return to
Flash to load the above file formats.
For Flash to do the communication with ASP you need to
determine if you are using URL Encoded or XML data structures.
For URL Encoded data you look at
LoadVars.sendAndLoad
For XML Encoded data you look at
XML.sendAndLoad
Then in their onLoad methods you use
MovieClip.loadMovie
to load JPEG, GIF, PNG and SWF;
Sound.loadSound
for MP3,
NetConnection.connect,
Video.attachVideo and NetStream.play for FLV.
For the ASP side the work with the database has nothing to do
with Flash other than using any search variable sent from Flash
with LoadVars.sendAndLoad or XML.sendAndLoad. In other words it
could be an HTML form sending the same variable and calling the
same ASP script. Same with returning values except with Flash only
URL Encoded or XML data structures are sent back and not
HTML. -
Retrieving an image from the database and printing it
Can anybody help please
i dont know how to retreive an image from a image database and send to the printer.
The image is stored in the database in cells ( not as a path to a file).Hi,
I want to print a gif image.
How can i get this done?
I am trying graphicsobject.drawImage(....),it prints the image only once.If i try second time the image wont be printed,where as if i switch off and then switch on the printer and try again ,then it will print.I am facing the same problem with a HP Laser Jet as well as a thermal Printer.Actually i want to print a bar code.
some body pls help me to sort this issue.
Regards,
ciju
[email protected] -
Loading an Image from the database and display it on browser
I do not know if this is even possible.
At the moment, to load an image inside an Html page you need to use the <img src=""> tag. and in the src you put the path of the image. Now I would like to save an image inside the database.
An option to still display the image on the browser would be that my service object, would load the object from the database (saved as blob) then save it somewhere on the Server, and the still use the <img> tag to load the image from that location.
However I was wondering wheather there is another way to do it without saving this image on the server. that is loading the bytes from the database (or a location on the server) and provided these bytes to the jsp page to display the image.
Is this possible? or?
regards,
sim085hmm ... ok .. that sounds good .. but that means that
a servlet must exsist at all time to display the
required image.Servlets are usually instantiated by the servlet container upon an incoming request. -
Get the list of table's last Inserted/Updated date from a database
Hi All,
Good afternoon!
Please help me to find the last inserted/updated date from different tables in a database.
Consider I have a database called testDB, which contains 20 tables. Most of these tables will get data inserted/updated daily. But sometimes it may not happen due to some issues . We will not be knowing about this issue until we check in each table
manually. Now, somebody should be daily checking for the issues in this db. So, we have decided to make an alert mail to send this informations to us.
We need to check whether any of the table's in TetsDB has got inserted/updated data in one day difference.
I have tried this..
SELECT OBJECT_NAME(OBJECT_ID) AS Object_, last_user_update,*
FROM sys.dm_db_index_usage_stats
WHERE database_id = DB_ID( 'TestDB')
Thanks,
JulieThe solution depends on the version and edition of your SQL Server.
If you use SQL Server 2000 or SQL Server 2005, please visit these links:
How do I audit changes to SQL Server data?
Table Auditing with SQL Server 2000
If your SQL Server 2008 or above (only on the Enterprise edition), please have a look at this link:
Change Data Capture
If your SQL Server 2008 or above (all editions),
you can use Change Tracking, but Change tracking captures the fact that rows in a table were changed, but does not capture the data that was changed.
more info:
Comparing Change Data Capture and Change Tracking
Saeid Hasani [sqldevelop]
HI,
I've read about change tracking change data capturing now.
We need to track the data daily and we need to know whether any modification happens in those tables.
Will it make any performance issue if I enable change data capturing on multiple tables.. lets say 20+ tables.? -
Displaying images from a database
Hi,
Does anyone know how to display an image from a db that is in
a page which is in a folder other than public_html. I can display
the picture in a page when the page is in the public_html folder,
but when the page is in a sub-folder then you get the dreaded
cross.
Thanks in advance,
PhilWhat you'll have to do is on the page that is in the
subfolder add code to concatinate the location. So for example if
you were working in ColdFusion you would have
Maybe you are looking for
-
Both of my sons have iPod touches. I set them both up on my iTunes account. The problem we are having is when they are using iMessage. When one sends a message the other also receives it. The message is labeled as from my email address. Is there a wa
-
BAdI: or User Exit for Campaign Creation IN CRM 5.0
Hi all, we are working in CRM 5.0, we have a Requirement like : when we create the campaign it should check higher level project ID (marketing Plan ID) if it is there it should permit for create campaign else it ll show error... Any BAdI: or User Exi
-
Ipad mini retina or ipad air?
The ipad mini has more pixel density than the ipad air, does this mean the mini has better graphics when watching movie or when looking at a picture/app?
-
Hi. Im new to Pages and im curious if there is such a thing as a grid that can be switched on and off ? Im trying to lay out photographs and text with consistency. Thanks.
-
Leica Monochrom and Lightroom export problems
I am using the latest version of LR on a 2011 Mac Book Pro. I am running into problems when I export Leica Monochrom DNG files that are shot AT AND ABOVE ISO 6400. Lightroom is brightening the files on export a lot so that the final exported file do