Jump to content

Inserting a text file into existing forum code


Guest pandora0123

Recommended Posts

Guest pandora0123

I am trying to insert an include link for a text file consisting of a drop down menu into the following code:

    $cplink = "| <a href=\""._BMcp0."\"><span class=\"navtd\">"._TEXTCP."</span></a>";   }  else   { 	$cplink = "";    }  if($searchstatus == 'on')  {     $searchlink = "| <a href=\""._BMsearch0."\"><span class=\"navtd\">"._TEXTSEARCH."</span></a>";   }   if($messotdstatus == 'on')  { 	$messotdlink = "| <a href=\""._BMmessotd0."\"><span class=\"navtd\">"._TEXTMESSOTD."</span></a>";  }   if($faqstatus == 'on') 	   { 	$faqlink = "| <a href=\""._BMmisc1."action=faq\"><span class=\"navtd\">"._TEXTFAQ."</span></a>";  }   if($memliststatus == 'on')    {     $memlistlink = '| <a href="'._BMmemberslist0.'"><span class="navtd">'._TEXTMEMBERLIST.'</span></a>';   }   if($boardimg != "")      {     $logo = "<tr><td><a href=\""._BMindex0."\"><img src=\""._ROOTMOD."/$boardimg\" alt=\"Board logo\" border=\"0\" /></a></td> </td></tr>";   }  if($statspage == 'on')  { 	$statslink = "| <a href=\""._BMstats0."\"><span class=\"navtd\">"._TEXTSTATS."</span></a>";   }

I tried inserting a php include link at the following location in the code which is where I want the drop down menu to show up, but all I get is an error.

 $logo = "<tr><td><a href=\""._BMindex0."\"><img src=\""._ROOTMOD."/$boardimg\" alt=\"Board logo\" border=\"0\" /></a></td>I TRIED HERE </td></tr>";   }

I am still new to php, and am learning more every day, but this has stumped me. Does anyone have any ideas on what to do? If I haven't posted enough information, please let me know. Thanks for any help you can give!

Link to comment
Share on other sites

You have to declare php variables with the '$'.Check this tutorial page,PHP SyntaxThis is an example of how your code should look:

<?php$BMcp0 = 'http://www.google.com';$TEXTCP = 'Search';$cplink = "| <a href=\"".$BMcp0."\"><span class=\"navtd\">".$TEXTCP."</span></a>";echo $cplink; ?>

Let us know if you need more help.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...