User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the PHP section within the Web Development category of DaniWeb, a massive community of 423,813 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,788 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our PHP advertiser: Lunarpages PHP Web Hosting

Cutting amount of work and loading time?

Join Date: Jan 2008
Posts: 71
Reputation: amigura is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 7
amigura's Avatar
amigura amigura is offline Offline
Junior Poster in Training

Re: Cutting amount of work and loading time?

  #4  
May 17th, 2008
the $info['$big_image'] is not from db it is a set varible so it should be echo $big_image and same with $info['ref'] - echo $ref;
the image and ref should go below db query to get info also


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/strict.dtd"> 
<head><link rel="stylesheet" type="text/css" href="http://www.equinefocus.co.uk/style/20080512.css"/></head> 

<html><body>

		<?php	$page_title='Equine Focus';
			include($_SERVER['DOCUMENT_ROOT'].'/style/20080512photography.php');?>

<div id="main">
<center>

<div class="pagination">
	<ul>
	<li><a href="/photos/other/2008-04-27/page01.php">Return to album</a></li>
	</ul>
</div>

	<?php  
	// Connects to your Database  
	mysql_connect("*****", "*****", "*****") or die(mysql_error());  
	mysql_select_db("*****") 
	or die ("Unable to connect to MySQL");

		
		
		// mysql
		$data = mysql_query("SELECT * FROM `eventing` WHERE date = '2008-04-13' AND ref ='080'") or die 
		("No data available, please contact the site admin describing where you found this error message.");  
		?>
	
	<table cellpadding="2" width="65%">
	
	<?php
	while($info = mysql_fetch_array($data)) {  
                        // images
		$big_image='/photos/eventing/'.$info['date'].'/'.$info['image'];
		$thumb='/photos/eventing/'.$info['date'].'/thumbs/'.$info['image'];
		
		// ref
		$ref = $info['date'].'-'.$info['ref'];
	?>

	<tr><td>	<img src="<?php echo $big_image; ?>" border="0"</a></td></tr>
	<tr><td>	<span class="refno">Photo Reference: <?php echo $ref; ?></span></td></tr>
	<tr><td>	<?php echo $info['info']; ?></td></tr>

	</table>


<?php
}  
?>
</table> 


</div></center>
</html></body> 

Reply With Quote  
All times are GMT -4. The time now is 3:00 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC