Hello faithful Php developers out there, first off ive only been doing Real PHP Scripting for 4 months, and basic php for yrs but this I have a problem with, so maybe you brains can help me.
(sorry my typos, i fixed urls and parse errors)
Ok go to www.animega.net and click around the links like reviews, etc... and you will see how the navigation includes work which is currently set up in the code like this
(ps. breaking tags so itll show..i think)
< ?
if ( $page=='' ) {
$page="sitenews/news.txt";
$menu="mainmenu.txt";
$l="?";
}
else {
$page="$page";
$menu="$menu";
}
? >
and uses this in the content area
< ?php include("$page"); ? >
And "sitenews/news.txt is output from Coranto, but Im modifying a script, that use Vbulletin to handle news, and its placed on the main page.
Anyway the "alpha" im working on so Im not using coranto anymore, its at www.animega.net/alpha.php is the test file. this is how i have it set up now
< ?php
include ('newsconfig.php');
if ( $page=='' ) {
$page="http://www.animega.net/1.txt";
$menu="http://www.animega.net/mainmenu.txt";
$l="?";
}
else {
$page="$page";
$menu="$menu";
}
if ( $news=='' ) {
$news=news();
$l="&";
}
else {
$news="$news";
}
? >
and im using this in the content
< ?php
include("$page");
echo $news;
? >
as you can see, newsconfig is the global that houses all the configurations for this script, its using a function to query the mysql databases etc..but anyway news() is the function name, and supposedly all u have to do would be to use something like
< ? echo news() ? > because all its doing is printing out the article the actually function is being carried out in the other file and that refernce to 1.txt is a blank file im using to replace the coranto news, But anyway, I just want that news() to be shown on the front page and not throughout the other site, because as now on alpha.php (i have to rename it to index.php to fully test it in place of the current one) if u click a link it to go elsewhere on the site ie. http://www.animega.net/index.php?page=anime/index.txt&menu=anime/menu.txt (note this is when the alpha.php is renamed to index.php NOT the current one) it will just show the news under the content..unless i use something like this http://www.animega.net/index.php?page=anime/index.txt&menu=anime/menu.txt&news=x
basically adding &news=whatever which blanks that include out but i dont wanna have to redo every single link adding that at the end of it, does anyone know a solution...?