er0x Posted September 11, 2007 Share Posted September 11, 2007 Link to tutorial = http://www.phpfreaks.com/tutorials/43/0.php i like how it comes out in the end. But im having just a bit of editing problems where? echo("<table>"); while($row = mysql_fetch_array($result)){ if ($bgcolor == "#E0E0E0"){ $bgcolor = "#FFFFFF"; }else{ $bgcolor = "#E0E0E0"; } echo("<tr bgcolor=".$bgcolor.">n<td>"); echo($row["linkname"]); echo("</td>n<td>"); echo($row["link"]); echo("</td>n</tr>"); } echo("</table>"); this is how its currently set up (only changed the row names) I have tried to configure it so it resembles... The 2 back ground colors, *which is easy and i can do.* Font color blue*i have the specific code but nothing i try works. how do i change the text color for the output?* also, i want it to show the linkname and be clickable to take you to the link... and where the link is now i want show the description (which i can do) so i really just need the font color different and to make the link clickable. please help ive been on this for 3 days now. Quote Link to comment https://forums.phpfreaks.com/topic/68777-solved-pagination-tutorial/ Share on other sites More sharing options...
cooldude832 Posted September 11, 2007 Share Posted September 11, 2007 everything you posted is post pagnation. Pagnation comes into effect into in the query part the limits and setting of the limits as for your question at hand. its all html, just output anchor tags to make your links into links, and to change text color you can put on the <td> or <a> tags the properties or classes of your choice. Also your code is a bit strange, while it works and there are a lot of ways to do it one way I like to do a rotating color scheme is using a array of colors and then it can work for many colors. (fyi using the proper<?php opener in the fourm gives pretty print text) <?php $color = array("#EOEOEO","#FFFFFF"); $num_colors = count($color)-1; $i = 0; echo "<table>"; while($row = mysql_fetch_array($result)){ //Resets the color counter to 0 if it gets too high if($i > $num_colors){$i = 0;} echo "<tr bgcolor=\"".$color[$i]."\"> <td><a href=\"".$row['link']."\" >".$row["linkname"]."</a></td></tr>"; $i++; } ?> I cleaned it up, altered it a bit, but I think what it is shooting for, less the links being colored, but if this makes sense I think you can figure out the link coloring. Also I changed the color to an array method so if you wanted say a 3 color rotation it could be easily done. Quote Link to comment https://forums.phpfreaks.com/topic/68777-solved-pagination-tutorial/#findComment-345732 Share on other sites More sharing options...
er0x Posted September 11, 2007 Author Share Posted September 11, 2007 THANK YOU SO MUCH i finally got it working right. you are awesome. Quote Link to comment https://forums.phpfreaks.com/topic/68777-solved-pagination-tutorial/#findComment-345762 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.