Jump to content

data table help


davithedork

Recommended Posts

hi, im really new at this, but could someone help me with tables?  i've been researching and trying to figure this out for 3 hrs..  so i turn to here.  i hope you guys can help me.. 

 

what i'm trying to do is to get the cell to input the style number into each individual cell, from left to right.

here is the website: http://downtownfashion.net/children.php

as you can see, its forming a cell with a cell forming it towards the right.. how do i do it so it doesnt go inside another cell?  thank you.

 

if(!isset($_GET['page'])){

    $page = 1;

} else {

    $page = $_GET['page'];

}

 

// Define the number of results per page

$max_results = 3;

 

// Figure out the limit for the query based

// on the current page number.

$from = (($page * $max_results) - $max_results);

 

// Perform MySQL query on only the current page number's results

 

$sql = mysql_query("SELECT * FROM flowergirl LIMIT $from, $max_results");

 

while($row = mysql_fetch_array($sql)){

    // Build your formatted results here.

echo "<table border='8'> <td><td>";

echo $row['styleno']."<td>";

 

 

 

 

 

 

 

}

 

// Figure out the total number of results in DB:

$total_results = mysql_result(mysql_query("SELECT COUNT(*) as Num FROM flowergirl"),0);

 

// Figure out the total number of pages. Always round up using ceil()

$total_pages = ceil($total_results / $max_results);

 

// Build Page Number Hyperlinks

echo "<center>Select a Page<br />";

 

// Build Previous Link

if($page > 1){

    $prev = ($page - 1);

    echo "<a href=\"".$_SERVER['PHP_SELF']."?page=$prev\"><<Previous</a> ";

}

 

for($i = 1; $i <= $total_pages; $i++){

    if(($page) == $i){

        echo "$i ";

        } else {

            echo "<a href=\"".$_SERVER['PHP_SELF']."?page=$i\">$i</a> ";

    }

}

 

// Build Next Link

if($page < $total_pages){

    $next = ($page + 1);

    echo "<a href=\"".$_SERVER['PHP_SELF']."?page=$next\">Next>></a>";

}

echo "</center>";

?>

Link to comment
https://forums.phpfreaks.com/topic/47484-data-table-help/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.