Jump to content

Image Not Shown


m@m

Recommended Posts

Here is the User profile search form... when i search that all details comes without Employee's Photo.. What's the error ?

 

</head>
<body>

<?php 

		$uname = $_POST['uname'];
		$sql = "SELECT * FROM emp WHERE uname = '$uname'";
		$result = mysql_query($sql);
		if (mysql_num_rows($result) > 0)
		{
			while ($row = mysql_fetch_array($result))
			{
				$fname = $row['fname'];
                    $lname = $row['lname'];
				$email = $row['email'];
				$address = $row['address_1'];
				$address2= $row['address_2'];
				$address3= $row['address_3'];
				$image = $row['image'];
                    $gender=$row['gender'];
                    $mobile=$row['tp_mobile'];
                    $land=$row['tp_lnd'];
                    $bod=$row['bod'];
                    
			}
            }
                  
	?>  


<div class="main">
  <div class="header">
    <div class="header_resize">
      <div class="logo"><h1></h1></div>
      
      
      <div class="clr"></div>
      <div class="search">
        <form id="form1" name="form1" method="post" action="emp_profile.php">
          <span>
          <input name="uname" type="text" class="keywords" id="textfield" maxlength="50"  />
          
          </span>
          <input name="image" type="image" src="images/search.gif" class="button" />
        </form>
      </div>
               <div class="menu">
        <ul>
          <!--
<li><a href="index.html" class="active">Home</a></li>
          <li><a href="services.html">Services</a></li>
          <li><a href="about.html"> About Us </a></li>
          <li><a href="contact.html"> Contact Us</a></li>
-->
        </ul>
      </div>
      
    </div>
    <div class="clr"></div>
  </div>
        <div class="clr"></div>
  
    <div class="body">
        <div class="body_resize">

        <form id="" method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>" enctype="multipart/form-data"  accept-charset='UTF-8'> 
        <div id="container">

<fieldset >

<div id="content-container1">
	<div id="content-container2">
         
		<div id="section-navigation">
			<img align="top"  width="175" height="200" src="emp_images/<?php echo $image; ?>"/>
                <div>
                  
                
                    <!--
<label>Patient Name : </label>

-->
<br />


     
     </div>
                

		</div>

		<div id="content" align="justify">
           

                
			<h2>
		    <label for="fname"> <?php echo $fname; ?></label> 
                <label for="lname"> <?php echo $lname; ?></label>
			</h2>
			<p>
                <label><b>Email:</b></label>
                <br />
                <label for="email"> <?php echo $email; ?></label>
			</p>
			<p>
                <label><b>Employee Address:</b></label>
                <br />
                <label > <?php echo $address; ?></label> </p> 
                <p>
                <label><b>Employee Address 2:</b></label>
                <br />
                <label > <?php echo $address2; ?></label>
                
                <p>
                <label><b>Employee Address 3:</b></label>
                <br />
                <label > <?php echo $address3; ?></label>


                    <p>
                    <label><b>Gender:</b></label>
                    <br />
                <label > <?php echo $gender ?></label>
                </p> 



                    <p>
                    <label><b>Employees Mobile:</b></label>
                    <br />
                    <label > <?php echo $mobile ?></label>
                    </p>

                    <p>
                    <label><b>Employees Resident Number:</b></label>
                    <br />
                    <label > <?php echo $land ?></label>
                        </p>


				<p>
                    <label><b>Date of Birth:</b></label>
                    <br />
                    <label > <?php echo $bod ?></label>
                        </p>
        	


                

</div>
            
</div>
  </fieldset>    
     
      <div class="clr"></div>
      
      
    </div>
  </div>
  </form>

                <div class="footer">
                <div class="footer_resize">
                <p>© P2011-001</p>
                </div>
                <div class="clr"></div>
                </div>
       
    </div>
    
</div>
</div>
</body>
</html>


<?php 
mysql_close($con);
?>

Link to comment
Share on other sites

Well, I would think that the src attribute of the image is not pointing to a valid image. Have you checked the rendered the HTML source and verified the value of the image attribute? Is it valid?

 

EDIT: FYI you are providing a 'relative' path to the image. You may be running this from a URL that is not correct for that relative path.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.