davithedork Posted April 18, 2007 Share Posted April 18, 2007 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 More sharing options...
davithedork Posted April 18, 2007 Author Share Posted April 18, 2007 echo "<table border='8'> <td><td>"; echo $row['styleno']."<td>"; the styleno is the part where i need for it to be in a table with 3 columns or more. as well making 7 or more rows below it for other information. Link to comment https://forums.phpfreaks.com/topic/47484-data-table-help/#findComment-231737 Share on other sites More sharing options...
davithedork Posted April 18, 2007 Author Share Posted April 18, 2007 :'( please. i dont understand when i make tables, it wont work.. is there a special php table format that i didnt learn from my dummie book? Link to comment https://forums.phpfreaks.com/topic/47484-data-table-help/#findComment-231760 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.