проблем с upload на снимки в база данни

virtuoso

Registered
не мога да разбера защо не излиза самата снимка а само името и как да го направя да излиза снимката


personal_modify_company.php
Код:
<?php

require_once ("../check_session.php");
require_once ("../mysql_conn.php");

if ($_POST['sbm'] == "yes") {
	$form_1 = trim (htmlspecialchars ($_POST['1'], ENT_QUOTES));
	$form_2 = trim (htmlspecialchars ($_POST['2'], ENT_QUOTES));
	$form_3 = trim (htmlspecialchars ($_POST['3'], ENT_QUOTES));
	$form_4 = trim (htmlspecialchars ($_POST['4'], ENT_QUOTES));
	$form_5 = trim (htmlspecialchars ($_POST['5'], ENT_QUOTES));
	$form_6 = trim (htmlspecialchars ($_POST['6'], ENT_QUOTES));
	$form_7 = trim (htmlspecialchars ($_POST['7'], ENT_QUOTES));
	$form_8 = trim (htmlspecialchars ($_POST['8'], ENT_QUOTES));
	mysql_query ("UPDATE company SET name='$form_1', address='$form_2', pcode='$form_3', industry='$form_4', tax_ref='$form_6' ,email='$form_7' ,image='$form_8' WHERE manager_id=".$_SESSION['uid']);
	
	header ("Location: personal_modify_company.php?a=y");
}

?>


<!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=iso-8859-1" />
<title>Nexus Business Support</title>
<link href="global.css" rel="stylesheet" type="text/css" />
<style type="text/css">
h1  {
  color:#636363;
  float:left;
  font-size:1.8em;
  padding:0;
}

.content h2  {
  color:#FFF;
  font-weight:bold;
  margin:0.2em 0;
  padding:0.2em 0.3em;
}

}



.style16 {color: #336699}
.style18 {
	font-family: Arial, Helvetica, sans-serif;
	font-size: 12px;
	font-weight: bold;
	color: #336699;
	line-height: normal;
}
.style19 {
	font-size: 12px;
	color: #336699;
	font-family: Arial, Helvetica, sans-serif;
	font-weight: normal;
	font-style: normal;
	text-indent: 10px;
	text-align: left;
}
	.style20 {
	color: #132D68;
	font-weight: bold;
	font-size: 12px;
}

</style>
</head>

<body>
<table width="100%" align="center">
  <tr>
    <td width="216"><a href="../../index.html"><img src="http://nexussupport.co.uk/images/logo2.jpg" border="0"></a></td>
    <td width="309" align="center"><?php
	$company_data = mysql_fetch_row (mysql_query ("SELECT * FROM company WHERE manager_id=".$_SESSION['uid']));
	?>
      <p class="style20"><?php echo ($company_data [1])?></td>
    <td width="209" align="right" ><br>
      <?php
require_once ("header.php");

?>

    </td>
  </tr>
</table>
<hr><br><br><p> </p><br>
      <div>
        <table width="212"  border="0" align="left">
          <tr>
            <td ><span class="style18">Modify Your Profile</span></td>
          </tr>
          <tr>
            <td class="style19"><a href="personal_modify_company.php">Company details</a></span></td>
          </tr>
          <tr>
            <td  class="style19">Change password</span></td>
          </tr>
          <tr>
            <td><span  class="style18"></span></td>
          </tr>
          <tr>
            <td ><span  class="style18">Manage Users</span></td>
          </tr>
		   <tr>
            <td class="style19"><a href="users.php">View</a></td>
          </tr>
          <tr>
            <td> </td>
          </tr>
          <tr>
            <td><span  class="style18">Manage Employees</span></td>
          </tr>
          <tr>
            <td class="style19"><a href="employee_add.php"class="style19">Add</a></td>
          </tr>
          <tr>
            <td class="style19"><a href="employee_edit.php"class="style19">Edit</a></td>
          </tr>
          <tr>
            <td class="style19"><a href="employee_delete.php"class="style19">Delete</a></td>
          </tr>
        </table>
<div id="contentWrapper">
  <div id="contentMain">
    <p><strong>Company Details</strong></p>
	
	<?php if ($_GET['a'] == "y") { ?>
	<p style="color:#72A231;"><strong>Your changes have been made.</strong></p>
	<?php } ?>
	
	    <p>Please ensure that the information you provide here is completely accurate, as it will be used for creating various documents.</p>
	
	<?php
	$company_data = mysql_fetch_row (mysql_query ("SELECT * FROM company WHERE manager_id=".$_SESSION['uid']));
	?>


	<form action="personal_modify_company.php" method="post">
		<table align="center" cellpadding="3">
		<tr>
			<td><div align="right"><strong>Company Name:</strong></div></td>
			<td><input type="text" name="1" style="width:250px;" value="<?php echo ($company_data [1]); ?>" /></td>
		</tr>
		<tr>
			<td><div align="right"><strong>Address:</strong></div></td>
			<td><textarea name="2" style="width:250px; height:80px;"><?php echo ($company_data [2]); ?></textarea></td>
		</tr>
		<tr>
			<td><div align="right"><strong>Postal Code:</strong></div></td>
			<td><input type="text" name="3" style="width:150px;" value="<?php echo ($company_data [3]); ?>" /></td>
		</tr>
		<tr>
			<td><div align="right"><strong>Telephone No:</strong></div></td>
			<td><input type="text" name="4" style="width:150px;" value="<?php echo ($company_data [4]); ?>" />
			</td>
		</tr>
		<tr>
			<td><div align="right"><strong>Fax No:</strong></div></td>
			<td><input type="text" name="6" style="width:150px;" value="<?php echo ($company_data [6]); ?>" /></td>
		</tr>
		<tr>
			<td><div align="right"><strong>E-mail:</strong></div></td>
			<td><input type="text" name="7" style="width:150px;" value="<?php echo ($company_data [7]); ?>" /></td>
		</tr>
		<tr>
			<td><div align="right"></div></td>
		  <td></td>
		</tr>
		
		<tr>
			<td height="50"><input class=input type="file" name="8" ><?php echo ($company_data [8])?></td>
			<td></td>
		</tr>
		<tr>
			<td height="50"> </td>
			<td><input type="submit" value="Save Changes" />
			<input type="hidden" name="sbm" value="yes" /></td>
		</tr>
	</table>
	</form>
	
	
	<p> </p>
	

  </div>
</div>

<div class="clear"></div>

<div id="footer">
<center>Copyright 2008 © Nexus Business Support. All Rights Reserved.</center></div>

</body>
</html>
 

Back
Горе