Jump to content


Photo

How can I make there auto next pages for this?


  • Please log in to reply
2 replies to this topic

#1 captain20bucks

captain20bucks
  • New Members
  • Pip
  • Newbie
  • 6 posts

Posted 03 April 2006 - 03:50 AM

Hi, this script is looking preatty ugly, I really feel like theres a better way I should be doing this. Im trying to make it so theres an array to print my information for each video, then after 4 videos it makes a next page with the remaining videos. I've got more info in the middle next to where im talking about. I have this script running right now on [a href=\"http://www.anewideaco.com/happyfilms/video.php\" target=\"_blank\"]http://www.anewideaco.com/happyfilms/video.php[/a] if that would help to understand my question.
if ($websitesaredumb == "" || $websitesaredumb == "0")
{
//This is where I want there to be some sort of array or something that could make this echo the table with //the name/image/sketchnumber($sketch)/season#, and i wanted it to be able to print 4 of these with each //videos name and everything. then after 4 the bottom set would goto the next page. How could i do that?
//       <tr>
//        <td width=\"83\" height=\"63\" rowspan=\"2\" align=\"left\"><img src=\"sketchimg\"></td>
//        <td width=\"177\" align=\"center\"><a href=\"#\" //onClick=\"fatty(thesketch#);\"><u>Sketchname</u></a></td>
//        <td width=\"83\" rowspan=\"2\" align=\"left\"><img src=\"sketchimg\"></td>
//        <td width=\"177\" align=\"center\"><a href=\"#\"     //onClick=\"fatty(thesketch#);\"><u>Sketchname</u></a></td>
//      </tr>
//              <tr>
//        <td align=\"center\">sketchesseason#</td>
//        <td align=\"center\">sketchesseasson#</td>
//      </tr>
//      <tr>
//      <td colspan=\"4\">&nbsp;</td>
//      </tr>

echo "$top
      <tr>
      <td colspan=\"4\">&nbsp;</td>
      </tr>
      <tr>
        <td width=\"83\" height=\"63\" rowspan=\"2\" align=\"left\"><img src=\"media/theme.gif\"></td>
        <td width=\"177\" align=\"center\"><a href=\"#\" onClick=\"fatty(8);\"><u>Happy Films Theme Song</u></a></td>
        <td width=\"83\" rowspan=\"2\" align=\"left\"><img src=\"media/dadson.gif\"></td>
        <td width=\"177\" align=\"center\"><a href=\"#\" onClick=\"fatty(7);\"><u>Dad and Son</u></a></td>
      </tr>
      <tr>
        <td align=\"center\">Season 3</td>
        <td align=\"center\">Season 2</td>
      </tr>
      <tr>
      <td colspan=\"4\">&nbsp;</td>
      </tr>
      <tr>
        <td height=\"63\" width=\"83\" rowspan=\"2\" align=\"center\"><img src=\"media/banjo.gif\"></td>
        <td height=\"48\" align=\"center\"><a href=\"#\" onClick=\"fatty(6);\"><u>No More Stupid</u></a></td>
        <td rowspan=\"2\" width=\"83\" align=\"center\"><img src=\"media/bpb.gif\"></td>
        <td align=\"center\"><a href=\"#\" onClick=\"fatty(5);\"><u>Brother Paster Branden - Equality</u></a></td>
      </tr>
      <tr>
        <td align=\"center\">Season 1</td>
        <td align=\"center\">Season 2</td>
      </tr>
      <tr>
      <td colspan=\"4\">&nbsp;</td>
      </tr>
      <tr>
        <td height=\"63\" align=\"center\" witdth=\"83\" rowspan=\"2\"><img src=\"media/beatyer.gif\"></td>
        <td align=\"center\"><a href=\"#\" onClick=\"fatty(4);\"><u>Orevel Presley</u></a></td>
        <td rowspan=\"2\" align=\"center\"><img src=\"media/feetsa.gif\"></td>
        <td height=\"39\" align=\"center\"><a href=\"#\" onClick=\"fatty(3);\"><u>Whoesa' Feetsa'</u></a></td>
      </tr>
      <tr>
        <td align=\"center\">Season 2</td>
        <td align=\"center\">Season 2</td>
      </tr>
      <tr>
      <td colspan=\"4\">&nbsp;</td>
      </tr>
      <tr>
        <td height=\"63\" align=\"center\" witdth=\"83\" rowspan=\"2\"><img src=\"media/shower.gif\"></td>
        <td align=\"center\"><a href=\"#\" onClick=\"fatty(2);\"><u>Shower Dad</u></a></td>
        <td rowspan=\"2\" align=\"center\"><img src=\"media/turtle.gif\"></td>
        <td height=\"39\" align=\"center\"><a href=\"#\" onClick=\"fatty(1);\"><u>Jenkins Threw His Secretary Out The Window</u></a></td>
      </tr>
      <tr>
        <td align=\"center\">Season 3</td>
        <td align=\"center\">Season 2</td>
      </tr>";
}

if ($sketch == "8" & $websitesaredumb == "2" & $sponge == "0")
{
echo ($themeplay);
}

Please help!

Thanks, Branden

#2 Desdinova

Desdinova
  • Members
  • PipPipPip
  • Advanced Member
  • 41 posts

Posted 03 April 2006 - 07:39 AM

are you running this on a database?


and if I understand this right, you want to show 4 seasons, and within those 4 seasons all movies that belong to those seasons?

#3 captain20bucks

captain20bucks
  • New Members
  • Pip
  • Newbie
  • 6 posts

Posted 03 April 2006 - 08:37 PM

I have a database, but im not using it for this, i could but im not really sure how to. I dont really want it organized by seasons. Its just each video has a picture, then beside that it has the title of the video and under the title is the season where that video played. but since there are 4 columns, i can have 2 videos next to each other, making it a bit harder to just put in the video because the videos and titles are in the same <tr> tag then the seasons that go under the title are also in a <tr> tag together. Im wondering if there is a way that everytime i upload a video, i the otehr videos would move down to make room for the new one. I was thinking an array would work, since i only want 8 videos on the page. I could have it so maybe like after 4 sets of two videos, when a fifth is added the bottom row would go to a next page. Only, I'm not sure how to make arrays with php.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users