Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
What is wrong with my code??
Old 07-02-2010, 04:24 PM What is wrong with my code??
Extreme Talker

Posts: 246
Name: Patric
Trades: 0
Hi there, I've developed the following php code from scratch, but I think there are some syntax errors that are not allowing it to work, can some kind soul here take a look and see if there is anything blatently obvious as far as why it's not functioning?

I would greatly appreciate it.

PHP Code:
$down "";
$row "";
$buttons "";
$pdf "";
$firstC "";
                
$getTabs "SELECT type_name, behavior, event.shortName from content_type inner join page on
page.contentID = content_type.ID left join behaviors on behaviors.defID = content_type.ID inner join event on
event.ID = page.evID where evID = '"
.$_GET['i']."' group by type_name order by content_type.page_order ASC";
                
$doTabs mysql_query($getTabs);
                if(
mysql_num_rows($doTabs) > 0)
                {
                                while(
$arTabs mysql_fetch_array($doTabs))
                                {
                                                if(
$firstC=="" && $arTabs[0] != "PDF" && $arTabs[0] != "Whitepaper" && $arTabs[0] !
"Podcast"){$firstC $arTabs[0];}
                                                if(
$arTabs[0] != "Sponsor")
                                                {
                                                
$tabs str_replace("_"," ",$arTabs[0]);
                                                if(
$tabs == "Register")
                                                                {
                                                                                
$buttons.= "<h2><a href='event_register.php?
i="
.$_GET['i']."&t=".$tabs."'>PRICING & REGISTRATION</a></h2></a><br><hr><br>";
                                                                }
                                                                elseif(
$tabs == "PDF")
                                                                {
                                                                                if(
is_numeric(substr($short,-1))){$short substr($short,0,-1);}
                                                                                
$style file_get_contents('../'.$tabs.'/style/style.inc');
                                                                                
$test explode('|',$style);
                                                                                if(
$test[2]!="")
                                                                                {
                                                                                
$pdf.= "<a href='".$test[2]."?i=".$_GET['i']."' 
onClick='NewWindow(this.href,\""
.$tabs."\",\"900\",\"800\",\"yes\");return false;' >".$test[0]."</a>";
                                                                                }
                                                                                else
                                                                                {
                                                                                
$pdf.= "<a href='../".$arTabs[1]."/".$arTabs[2].$test[1]."'
onClick='NewWindow(this.href,\""
.$tabs."\",\"900\",\"800\",\"yes\");return false;' >".$test[0]."</a>";
                                                                                }
                                                                }
                                                                elseif(
$tabs == "Podcast" || $tabs == "Whitepaper")
                                                                {
                                                                                
$style file_get_contents('../'.$arTabs[1].'/style/style.inc');
                                                                                
$test explode('|',$style);
                                                                                if(
$test[2]!="")
                                                                                {
                                                                                
$down.= "<h2><a href='".$test[2]."?i=".$_GET['i']."' 
onClick='NewWindow(this.href,\""
.$tabs."\",\"900\",\"800\",\"yes\");return false;' >".$test[0]."</a></h2>";
                                                                                }
                                                                                else
                                                                                {
                                                                                
$down.= "<h2><a href='../".$arTabs[1]."/".$arTabs[2].$test[1]."'
onClick='NewWindow(this.href,\""
.$tabs."\",\"900\",\"800\",\"yes\");return false;' >".$test[0]"</a></h2>";
                                                                                }
                                                                }
                                                                else
                                                                {
                                                                                if(
strstr($tabs," ") !== FALSE)
                                                                                {
                                                                                                
$buttons .= "<div class='autosize'><div><h2><a
href='event_listing.php?i="
.$_GET['i']."&t=".$arTabs[0]."'>".strtoupper($tabs)."</a></h2></div></div><hr><br>";
                                                                                }
                                                                                else
                                                                                {
                                                                                                
$buttons .= "<div class='autosize'><div><h2><a
href='event_listing.php?i="
.$_GET['i']."&t=".$tabs."'>".strtoupper($tabs)."</a></h2></div></div><hr><br>";
                                                                                }
                                                                }
                                                }
                } 
Reckoner is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 07-02-2010, 04:48 PM Re: What is wrong with my code??
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,385
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
do we get a hint at the errors? Because it will be impossible to rectreate them without your database structures.
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Reply     « Reply to What is wrong with my code??
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.10260 seconds with 12 queries