HTML Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsWeb DesignHTML Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old November 28th, 2012, 02:02 AM
josephbupe josephbupe is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2012
Posts: 56 josephbupe User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 13 h 10 m 2 sec
Reputation Power: 1
New Member - Help create a table template

Hi,

I am wondering how I can create a table to display data from MySQL database in a pattern like a chess board, instead of continuous data-grid.

I intend to display images this way.

I will appreciate your help.

Joseph

Reply With Quote
  #2  
Old November 28th, 2012, 03:58 AM
toddyaww toddyaww is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2012
Posts: 8 toddyaww Negative: is most likely a SPAMMER and a traitor to the cause. 
Time spent in forums: 1 h 28 m 48 sec
Reputation Power: 0
Create a table template

We create more table template in HTML web designing. But today table is then use as compare to div class in html. Because it is so easy.

Reply With Quote
  #3  
Old December 2nd, 2012, 01:45 AM
josephbupe josephbupe is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2012
Posts: 56 josephbupe User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 13 h 10 m 2 sec
Reputation Power: 1
Help create a table template

Quote:
Originally Posted by toddyaww
We create more table template in HTML web designing. But today table is then use as compare to div class in html. Because it is so easy.


Ok, the following is the table I want replaced with DIVs function:

Code:
<table width="800" border="0" align="left" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">    <tr>     <td>       <table width="750" border="0" align="left" cellpadding="0" cellspacing="0">         <tr>           <td align="left"> <? echo "<div align=right>$text</div>"; echo "<table width=700 border=0 cellpadding=0 cellspacing=0 align=left>\n <tr>\n 	<td> Total No of Records Found: $num &nbsp; \n 	<td> &nbsp;\n 	 </tr>\n <tr> \n";  //part of paging code     if($num) ////////////////// $i=0; $counter=0; while($row=mysql_fetch_array($result)) { 	$sn=$row['m_id']; 	$mtitle=$row['mtitle']; 	$mfilename=$row['mfilename']; 	 	if($counter>=0) { 	echo "<td valign=top>\n 	 	<table width=150 border=0 align=left class=allborder> \n 	<tr> \n 		<td width=70>$mtitle</td> \n 		 	</tr>\n 		<tr> \n 		<td><a href=details.php?m_id=$sn><img src=\"./images/{$row['mfilename']}\" width=\"90\" height=\"120\" alt=\"\" /></a> \n 		 		</td> 	</tr>\n 		 	</table>\n</td>\n 	 "; 	 $counter++; 	 }  	 if($counter==5) { 	 	echo "</tr>\n<tr>\n<td colspn=2>&nbsp; \n</tr>\n<tr>\n"; 		$counter=0; 	 } }	  echo "</table>\n"; ?></td> 	    </tr>     </table></td> <td>  </td>      </tr> </table>



My try was I didn't know how to completely replace the table, so I started with the part that returns the query results leaving the rest as it was:

Code:
<div class="ad"> \n 	  <class="image"/><td><a href=details.php?m_id=$sn><img src=\"./images/{$row['mfilename']}\" width=\"90\" height=\"120\" alt=\"\" /><br /> \n 	  <span class="text">$mtitle</span> \n 	</div> \n


But here I got an error:

Quote:
Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in C:/Program ... on line 210


Line 210 is
Quote:
<div class="ad"> \n


I will appreciate any help with this.

Joseph

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignHTML Programming > New Member - Help create a table template

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap