Web Hosting Talk







View Full Version : PHP portfolio - help


Aristotl3
03-06-2007, 11:56 AM
Hey guys - can anyone help me figure out why this portfolio isn't working properly?

Here is the webpage:
http://www.theideafarm.net/portfolio.php

You will notice that the audio and video links are not working properly. I have included the code below to show how the audio and video pages are linked. Does anyone know what might be causing this error??

Thanks.

<p>&bull; <a href="portfolio.php?section=print&amp;page=1">Print</a></p>
<p>&bull; <a href="portfolio.php?section=identity&amp;page=1">Identity</a></p>
<p>&bull; <a href="portfolio.php?section=web&amp;page=1">Web</a></p>
<p>&bull; <a href="portfolio.php?section=video">Video Production</a></p>
<p>&bull; <a href="portfolio.php?section=audio">Audio Production</a></p>
<p>&bull; <a href="portfolio.php?section=outdoor&amp;page=1">Outdoor</a></p>

<p>&nbsp;</p>
</td></tr></table>

</div>

<div id=gray></div>


<?php

switch ($section){
case 'audio':
include 'portfolio_audio.php';
break;
case 'video':
include 'portfolio_video.php';
break;
default:
include 'portfolio_images.php';
break;};

?>

ThatScriptGuy
03-06-2007, 12:25 PM
What is the content of portfolio_audio.php, portfolio_video.php, and portfolio_images.php?

Aristotl3
03-06-2007, 12:51 PM
Here is what the video page looks like.. the audio page is set up like this as well:

<div id="video" style="position:absolute; width:325px; height:362px; z-index:2; left: 354px; top: 112px; visibility: visible; overflow: auto;">
<p>&nbsp;</p>
<p><strong>Video Portfolio</strong></p>

<p>Access 4000<br />
• <a href="portfolio_videoplay.php?track=access_4000_01">spot one</a><br />

<p>Commonwealth Cancer Center<br />
• <a href="portfolio_videoplay.php?track=ccc_01">spot one</a><br />

<p>Equestrian World<br />
• <a href="portfolio_videoplay.php?track=equestrian_world_01">spot one</a><br />
• <a href="portfolio_videoplay.php?track=equestrian_world_02">spot two</a><br />
• <a href="portfolio_videoplay.php?track=equestrian_world_03">spot three</a><br />

<p>Ferguson Van Lines<br />
• <a href="portfolio_videoplay.php?track=ferguson_01">spot one</a><br />
• <a href="portfolio_videoplay.php?track=ferguson_02">spot two</a><br />

<p>Hilliard Lyons<br />
• <a href="portfolio_videoplay.php?track=hilliard_lyons_01">spot one</a><br />
• <a href="portfolio_videoplay.php?track=hilliard_lyons_02">spot two</a><br />

<p>Hospice Media<br />
• <a href="portfolio_videoplay.php?track=hospice_01">spot one</a><br />
• <a href="portfolio_videoplay.php?track=hospice_02">spot two</a><br />
• <a href="portfolio_videoplay.php?track=hospice_03">spot three</a><br />
• <a href="portfolio_videoplay.php?track=hospice_04">spot four</a><br />

<p>Spring Grave<br />
• <a href="portfolio_videoplay.php?track=spring_grove_01">spot one</a><br />

<p>Tarter Gate<br />
• <a href="portfolio_videoplay.php?track=tarter_gate_01">spot one</a><br />

<p>&nbsp;</p>

</div>

mikey1090
03-06-2007, 03:00 PM
try

switch ($_GET['section']) {

}

Aristotl3
04-04-2007, 12:04 PM
OK... I have tried fixing this problem to no avail.. Does anyone have any other ideas of what I can do to get the Audio and Video pages working properly???

thanks

Adam Bray
04-04-2007, 05:09 PM
With your html why didnt you just use a list insted of lots of paragraphs and line breaks


<ul>
<li><a href="portfolio.php?section=print&amp;page=1">Print</a></li>
<li><a href="portfolio.php?section=identity&amp;page=1">Identity</a></li>
<li><a href="portfolio.php?section=web&amp;page=1">Web</a></li>
<li><a href="portfolio.php?section=video">Video Production</a></li>
<li><a href="portfolio.php?section=audio">Audio Production</a></li>
<li><a href="portfolio.php?section=outdoor&amp;page=1">Outdoor</a></li>
</ul>

<p>&nbsp;</p>
</td></tr></table>

</div>

<div id=gray></div>


<?php

$section = $_GET['section'];//Get the section

if( $secton == 'audio' )//Check if its equal to audio
{
include ("portfolio_audio.php");
}
elseif( $section == 'video' )
{
include ("portfolio_video.php");
}
else
{
include ("portfolio_images.php");
}

?>