Jump to content


  • Content Count

  • Joined

  • Last visited

Community Reputation

0 Neutral

About lu13cky

  • Rank
  • Birthday 09/24/1986

Contact Methods

  • AIM

Profile Information

  • Gender
  • Location
  1. yeah I've attempted it...annnnd it just turns my columns into rows.hah. I'll mess around with my code a bit more I guess to achieve it.
  2. I know how to do wonderful alternating row colors, but is there a way to do alternating column colors?
  3. I had to do some finagling - but! It worked.Thank you so much for your help :)the end coding turned out to be this: $result =mysql_query("SELECT * FROM photo WHERE id = '$id'") or die('Could not run query because: '.mysql_error());$imgNum=1;while ($row = mysql_fetch_assoc($result)) {$id = $row['id']; $name = $row['name']; $photo = $row['photo'];$number = $row['number'];?> <li><a class="boxed" href="#<?php echo $number; ?>"><?php echo $imgNum; ?></a></li><?$imgNum++;}?>
  4. yup :)The query is really simple - not much to it.$result =mysql_query("SELECT * FROM photo WHERE id = '$id'") or die('Could not run query because: '.mysql_error()); I currently have the ID set for each album name (ie. Portraits, Wedding, etc)
  5. For the actual numbered links: while ($row = mysql_fetch_assoc($result)) {$rowcolor = rowcolor($count);$id = $row['id']; $name = $row['name']; $photo = $row['photo'];$number = $row['number'];?> <li><a class="boxed" href="#<?php echo $number; ?>"><?php echo $number; ?></a></li> For the images: while ($row = mysql_fetch_assoc($result)) {$rowcolor = rowcolor($count);$id = $row['id']; $name = $row['name']; $photo = $row['photo'];$number = $row['number'];<a name="<?php echo $number; ?>" id="<?php echo $number; ?>"></a><img clas
  6. you didn't close out your script.. <html><head><script type="text/javascript" >function createtoplinks(){ document.write ("<ul class='site-nav'>"); document.write("<li class='m1'>"); document.write("<a href='compareDNA.html'><img src='images/m1.png' alt='Sequences Analysis'/></a>"); document.write("</li>"); document.write("<li class='m2'>"); document.write("<a href='news.html'><img src='images/m2.png' alt='New & Events'/></a>"); document.write("&
  7. I'm attempting to output a unique number for each row, which - I can obviously do with assigning the numbers in the database.However, to make my life easier, I'm trying to figure out how I would use COUNT or something similar to do this for me.And just so you can see what I'm talking about: http://www.stephanierhoades.net/view.php?id=portraitsthe numbering is fine, until you click on another album (Weddings has images up so you can see). The count does not start over (because why should it when the numbers are assigned). Of course this could cause some major headaches for visitors to my site
  8. I'm using the fancy pants css3 text rotation, but I can't get the text to align to the "bottom" (left). It stays centered. -webkit-transform: rotate(-90deg); -moz-transform: rotate(-90deg); filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=3); That is the text rotate css I'm using.and I've tried everything from vertical-align to text-align. So not sure if there is a way to get it aligned...or if I'm having a dumb moment.Please help?
  9. I'm attempting to do a table with two columns that displays information from one database and that also has alternating row colors.this is what I have so far: $result = mysql_query("SELECT * FROM table WHERE ID = '$id' ORDER BY name ASC") or die('Could not run query because: '.mysql_error());$count = 2;while ($row = mysql_fetch_assoc($result)) {$rowcolor = rowcolor($count);$tableborder = tableborder($count);$id = $row['id'];$name = $row['name'];$info = $row['info'];$infoii = $row['infoii'];$url = $row['url'];$contact = $row['contact'];if ($count%2) { ?><td><div class="name"> &
  10. I love you. :)Thank you soooo much. It worked. *dances*
  11. awesome thanks guys - I will try this out and see what happens *crosses fingers*
  12. I'm trying to do alternating row colors for a table. Now - I can get two colors just fine and dandy...but because I feel like torturing myself, I made up a design that requires three. I've been fighting with the code for the past few days and I have no clue what to do anymore.If someone could help me I would be very thankful.(also - I am still very green to php..so if you could use small words - I'd love ya )code from Header <?phpfunction rowcolor($count){$class1 = "row-1";$class2 = "row-2";$class3 = "row-3";if($count % 1 != 1){return $class1;}elseif($count % 1 != 2){return $class2;}els
  • Create New...