- Total Members: 263,771
- Threads: 454,018
- Posts: 1,062,438
Great community. Great ideas.
Welcome to SEOChat, a community dedicated to helping beginners and professionals alike in improving their Search Engine Optimization knowledge. Sign up today to gain access to the combined insight of tens of thousands of members.
-
Nov 23rd, 2012, 01:55 PM
#1
Displaying 2 columns in my PHP scripting
Need to create a 2 column output page. Currently I have a working 1 column page you can see here: freeskateboardsticker.com/news/authors.php
The script is here:
<?php include_once(realpath("templates/top.php")); ?>
<?php include_once(realpath("templates/$templates/mid1.php")); ?>
<?php
$page = @$_GET["page"];
$start = @$_GET["start"];
if(!is_numeric($page) || $page < 1)
$page = 1;
if($page == 1)
$start = 0;
else
$start = ($page * $authorsPerPage) - $authorsPerPage;
$aResult = mysql_query("select pk_alId, alEmail, alFName, alLName, alBio, alDateJoined from tbl_AdminLogins order by alFName, alLName limit $start, $authorsPerPage");
$numRows = mysql_num_rows(mysql_query("select pk_alId from tbl_AdminLogins order by alFName, alLName"));
if($numRows > 0)
{
?>
<!-- Start Authors -->
<div align="center">
<center>
<table width="86%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="100%" colspan="2" class="BodyHeader2">
<span class="BodyHeading">
<br><?php echo $siteName; ?> Authors
</span>
</tr>
<tr>
<td width="100%" height="20" colspan="2" align="right" valign="top">
<?php
if($page > 1)
$nav .= "<a href='authors.php?page=" . ($page-1) . "'><u>« Prev</u></a> | ";
for($i = 1; $i <= ceil($numRows / $authorsPerPage); $i++)
if($i == $page)
$nav .= "<a href='authors.php?page=$i'><b>$i</b></a> | ";
else
$nav .= "<a href='authors.php?page=$i'>$i</a> | ";
if(($start+$authorsPerPage) < $numRows && $numRows > 0)
$nav .= "<a href='authors.php?page=" . ($page+1) . "'><u>Next »</u></a>";
if(substr(strrev($nav), 0, 2) == " |")
$nav = substr($nav, 0, strlen($nav)-2);
echo $nav . "<br> ";
?>
</td>
</tr>
</table>
<div align="center">
<center>
<table cellpadding="0" border="0">
<?php while ($aRow = mysql_fetch_array($aResult)) { ?>
<tr>
<td> <?php if ($showAuthorImages) { ?><img src="imageview.php?what=getAuthorPic&authorId=<?ph p echo $aRow["pk_alId"]; ?>"> <?php } ?></td>
<td> </td>
<td><span class="BodyHeading1"><?PHP echo $aRow["alFName"]; ?></span>
<br><span class="Text1"><?php echo $aRow["alBio"]; ?></span><br>
<br><span class="BodyHeading3"> <a href="<?php echo $aRow["alEmail"]; ?>"><?php echo $aRow["alEmail"]; ?><img src="imageview.php?imageId=4"
border="0"></a><br></span></td>
</tr>
<tr>
<td colspan="3"> </td>
</tr>
<?php } ?>
</table>
</center>
</div>
<div align="center">
<center>
<table width="96%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="100%" height="20" colspan="2" align="right" valign="top">
<span class="Text4"><?php echo $nav . "<br> "; ?></span>
<br>
</td>
</tr>
</table>
</center>
</div>
<!-- End Authors -->
<?php
}
else
{
// No authors found in the database
?>
<!-- StartAuthors -->
<!-- End Authors -->
<?php
}
?>
<div align="center">
<center>
<table width="96%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="100%" height="20" colspan="2" align="right" valign="top">
<?php echo $nav . "<br> "; ?>
<br>
</td>
</tr>
</table>
</center>
</div>
<?php include_once(realpath("templates/bottom.php")); ?>
-
Nov 23rd, 2012, 02:16 PM
#2
What are we to say about this?
-
Nov 23rd, 2012, 02:24 PM
#3

Originally Posted by
dzine
What are we to say about this?
Need to create a 2 column output page. Currently I have a working 1 column page that is limited to 10 entries per page.
Which is the script above.
-
Nov 23rd, 2012, 02:31 PM
#4
Yes, but it is cluttered with irrelevant php code, or maybe even relevant php (we cannot tell). Why not search the web for a tried and tested 2 column template?
Also, you've posted this in the SEO Scripts section, but it has nothing whatsoever to do with SEO. Did you really sign up here (=a SEO forum) to ask this question about web design?
-
Nov 23rd, 2012, 02:36 PM
#5

Originally Posted by
dzine
Yes, but it is cluttered with irrelevant php code, or maybe even relevant php (we cannot tell). Why not search the web for a tried and tested 2 column template?
Also, you've posted this in the SEO Scripts section, but it has nothing whatsoever to do with SEO. Did you really sign up here (=a SEO forum) to ask this question about web design?
Actually, doing a web search for such an answer is what brought me here. forums.seochat.com/ seo-scripts-10/ building-a-table-with-php-how-to-do-two-columns-187040.html
-
Nov 23rd, 2012, 02:39 PM
#6

Originally Posted by
smc
Actually, doing a web search for such an answer is what brought me here. forums.seochat.com/ seo-scripts-10/ building-a-table-with-php-how-to-do-two-columns-187040.html
If I posted to the wrong forum, my apologies.
-
Nov 23rd, 2012, 02:48 PM
#7
Ah, in that case I understand 
Just know that there are few real web design specialists here, and showing all your php code here isn't helping really.
I do hope somebody will chime in to help you out.
-
Nov 23rd, 2012, 02:53 PM
#8

Originally Posted by
dzine
Ah, in that case I understand
Just know that there are few real web design specialists here, and showing all your php code here isn't helping really.
I
do hope somebody will chime in to help you out.
Thank you.
Similar Threads
-
By jrothra in forum SEO Help (General Chat)
Replies: 14
Last Post: Aug 10th, 2005, 02:30 PM
-
By Srivvy in forum Web Design, Coding and Programming
Replies: 1
Last Post: Jul 24th, 2005, 06:23 PM
-
By wannabrich in forum Google Optimization
Replies: 6
Last Post: Jun 9th, 2005, 11:38 PM
-
By Steve W in forum Google Optimization
Replies: 3
Last Post: Mar 23rd, 2005, 12:43 AM
-
By luxurysleep in forum Web Design, Coding and Programming
Replies: 5
Last Post: Jan 4th, 2005, 10:34 AM