I'm new to programming PHP. Can anyone tell me what I need to put in here to get it to work?
<?php
if (!eregi("modules.php", $_SERVER['PHP_SELF'])) {
die ("You can't access this file directly...");
}
require_once("mainfile.php");
$module_name = basename(dirname(__FILE__));
get_lang($module_name);
$pagetitle = "- "Members"";
$index = 1;
$ThemeSel = get_theme();
echo "<center><font class=\"content\">
<table cols=2 border=1 cellpadding=10>
<tr align=center><td colspan=2><img src=http://www.htmlforums.com/archive/index.php/modules/members/images/general.bmp align=left><b>General</b><br><br>Iceman</td></tr>
<tr align=center><td colspan=2><img src=http://www.htmlforums.com/archive/index.php/modules/members/images/colonel.bmp align=left><b>Colonel</b><br><br>Agent47</td></tr>
<tr align=center><td colspan=2><img src=http://www.htmlforums.com/archive/index.php/modules/members/images/ltc.gif align=left><b>Lieutenant Colonel</b><br><br>Legolas</td></tr>
<tr align=center><td colspan=2><img src=http://www.htmlforums.com/archive/index.php/modules/members/images/csm.bmp align=left><b>Command Sergeant Major</b><br><br>VACANT</td></tr>
<tr align=center><td><b>Squad 1</td><td><b>Squad 2</td></tr>
<tr align=center><td><img src=http://www.htmlforums.com/archive/index.php/modules/members/images/1stsgt.gif align=left><b>First Sergeant</b><br><br>VACANT</td><td><img src=modules/members/images/1stsgt.gif align=left><b>First Sergeant</b><br><br>VACANT</td></tr>
<tr align=center><td><img src=http://www.htmlforums.com/archive/index.php/modules/members/images/sfc.gif align=left><b>Sergeant First Class</b><br><br>VACANT</td><td><img src=modules/members/images/sfc.gif align=left><b>Sergeant First Class</b><br><br>VACANT</td></tr>
<tr align=center><td><img src=http://www.htmlforums.com/archive/index.php/modules/members/images/sergeant.bmp align=left><b>Sergeant</b><br><br>VACANT</td><td><img src=modules/members/images/sergeant.bmp align=left><b>Sergeant</b><br><br>VACANT</td></tr>
<tr align=center><td><img src=http://www.htmlforums.com/archive/index.php/modules/members/images/corporal.gif align=left><b>Corporal</b><br><br>VACANT</td><td><img src=modules/members/images/corporal.gif align=left><b>Corporal</b><br><br>VACANT</td></tr>
<tr align=center><td><img src=http://www.htmlforums.com/archive/index.php/modules/members/images/private.gif align=left><b>Private</b><br><br>VACANT</td><td><img src=modules/members/images/private.gif align=left><b>Private</b><br><br>VACANT</td></tr>Are you getting errors?
And you're missing a " on the echoI'm getting 潓牲ⱹ猠æµâ¨楦敬æ 敯湳ç§攠楸瑳⸮ at the top of my page, and it's not showing up in the modules page in the admin cpanel. If I view the page directly, I see the page but with that crap at the top, and it's just white, no theme colors or anything.where am I missing a "Here...
echo "<center><font class=\"content\">
Should be...
echo "<center><font class=\"content\">";
You missed the ";When I do that I get a buttload of ";" everywhere in the page.Originally posted by DA Master
echo "<center><font class=\"content\">";
You missed the ";
Have you copied the code above exactly?If I copy that line, I still get a "; in the top left corner of the screen.Sorry I understand now, should read this...
<?php
if (!eregi("modules.php", $_SERVER['PHP_SELF'])) {
die ("You can't access this file directly...");
}
require_once("mainfile.php");
$module_name = basename(dirname(__FILE__));
get_lang($module_name);
$pagetitle = "- "Members"";
$index = 1;
$ThemeSel = get_theme();
echo "<center><font class=\"content\">
<table cols=2 border=1 cellpadding=10>
<tr align=center><td colspan=2><img src=http://www.htmlforums.com/archive/index.php/modules/members/images/general.bmp align=left><b>General</b><br><br>Iceman</td></tr>
<tr align=center><td colspan=2><img src=http://www.htmlforums.com/archive/index.php/modules/members/images/colonel.bmp align=left><b>Colonel</b><br><br>Agent47</td></tr>
<tr align=center><td colspan=2><img src=http://www.htmlforums.com/archive/index.php/modules/members/images/ltc.gif align=left><b>Lieutenant Colonel</b><br><br>Legolas</td></tr>
<tr align=center><td colspan=2><img src=http://www.htmlforums.com/archive/index.php/modules/members/images/csm.bmp align=left><b>Command Sergeant Major</b><br><br>VACANT</td></tr>
<tr align=center><td><b>Squad 1</td><td><b>Squad 2</td></tr>
<tr align=center><td><img src=http://www.htmlforums.com/archive/index.php/modules/members/images/1stsgt.gif align=left><b>First Sergeant</b><br><br>VACANT</td><td><img src=modules/members/images/1stsgt.gif align=left><b>First Sergeant</b><br><br>VACANT</td></tr>
<tr align=center><td><img src=http://www.htmlforums.com/archive/index.php/modules/members/images/sfc.gif align=left><b>Sergeant First Class</b><br><br>VACANT</td><td><img src=modules/members/images/sfc.gif align=left><b>Sergeant First Class</b><br><br>VACANT</td></tr>
<tr align=center><td><img src=http://www.htmlforums.com/archive/index.php/modules/members/images/sergeant.bmp align=left><b>Sergeant</b><br><br>VACANT</td><td><img src=modules/members/images/sergeant.bmp align=left><b>Sergeant</b><br><br>VACANT</td></tr>
<tr align=center><td><img src=http://www.htmlforums.com/archive/index.php/modules/members/images/corporal.gif align=left><b>Corporal</b><br><br>VACANT</td><td><img src=modules/members/images/corporal.gif align=left><b>Corporal</b><br><br>VACANT</td></tr>
<tr align=center><td><img src=http://www.htmlforums.com/archive/index.php/modules/members/images/private.gif align=left><b>Private</b><br><br>VACANT</td><td><img src=modules/members/images/private.gif align=left><b>Private</b><br><br>VACANT</td></tr>"; ?>
Please wrap PHP code in vBCode PHP tags.I still can't get this crazy stuff. It still doesn't show up in the modules and doesn't format right. I'll just leave it as html.Do this then...
<?php
if (!eregi("modules.php", $_SERVER['PHP_SELF'])) {
die ("You can't access this file directly...");
}
require_once("mainfile.php");
$module_name = basename(dirname(__FILE__));
get_lang($module_name);
$pagetitle = "- "Members"";
$index = 1;
$ThemeSel = get_theme(); ?>
<font class="content" align="center">
<table cols=2 border=1 cellpadding=10>
<tr align=center><td colspan=2><img src=http://www.htmlforums.com/archive/index.php/modules/members/images/general.bmp align=left><b>General</b><br><br>Iceman</td></tr>
<tr align=center><td colspan=2><img src=http://www.htmlforums.com/archive/index.php/modules/members/images/colonel.bmp align=left><b>Colonel</b><br><br>Agent47</td></tr>
<tr align=center><td colspan=2><img src=http://www.htmlforums.com/archive/index.php/modules/members/images/ltc.gif align=left><b>Lieutenant Colonel</b><br><br>Legolas</td></tr>
<tr align=center><td colspan=2><img src=http://www.htmlforums.com/archive/index.php/modules/members/images/csm.bmp align=left><b>Command Sergeant Major</b><br><br>VACANT</td></tr>
<tr align=center><td><b>Squad 1</td><td><b>Squad 2</td></tr>
<tr align=center><td><img src=http://www.htmlforums.com/archive/index.php/modules/members/images/1stsgt.gif align=left><b>First Sergeant</b><br><br>VACANT</td><td><img src=modules/members/images/1stsgt.gif align=left><b>First Sergeant</b><br><br>VACANT</td></tr>
<tr align=center><td><img src=http://www.htmlforums.com/archive/index.php/modules/members/images/sfc.gif align=left><b>Sergeant First Class</b><br><br>VACANT</td><td><img src=modules/members/images/sfc.gif align=left><b>Sergeant First Class</b><br><br>VACANT</td></tr>
<tr align=center><td><img src=http://www.htmlforums.com/archive/index.php/modules/members/images/sergeant.bmp align=left><b>Sergeant</b><br><br>VACANT</td><td><img src=modules/members/images/sergeant.bmp align=left><b>Sergeant</b><br><br>VACANT</td></tr>
<tr align=center><td><img src=http://www.htmlforums.com/archive/index.php/modules/members/images/corporal.gif align=left><b>Corporal</b><br><br>VACANT</td><td><img src=modules/members/images/corporal.gif align=left><b>Corporal</b><br><br>VACANT</td></tr>
<tr align=center><td><img src=http://www.htmlforums.com/archive/index.php/modules/members/images/private.gif align=left><b>Private</b><br><br>VACANT</td><td><img src=modules/members/images/private.gif align=left><b>Private</b><br><br>VACANT</td></tr>
Also this line...
<center><font class="content">
Don't use the <center> tag, it's depricated, see my changed above...
<!-- m --><a class="postlink" href="http://www.w3schools.com/tags/tag_center.asp">http://www.w3schools.com/tags/tag_center.asp</a><!-- m -->
One last thing, don't use bitmaps in web pages. Use a .gif or .jpg (.jpg for pictures .gif for anything else generally).
<?php
if (!eregi("modules.php", $_SERVER['PHP_SELF'])) {
die ("You can't access this file directly...");
}
require_once("mainfile.php");
$module_name = basename(dirname(__FILE__));
get_lang($module_name);
$pagetitle = "- "Members"";
$index = 1;
$ThemeSel = get_theme();
echo "<center><font class=\"content\">
<table cols=2 border=1 cellpadding=10>
<tr align=center><td colspan=2><img src=http://www.htmlforums.com/archive/index.php/modules/members/images/general.bmp align=left><b>General</b><br><br>Iceman</td></tr>
<tr align=center><td colspan=2><img src=http://www.htmlforums.com/archive/index.php/modules/members/images/colonel.bmp align=left><b>Colonel</b><br><br>Agent47</td></tr>
<tr align=center><td colspan=2><img src=http://www.htmlforums.com/archive/index.php/modules/members/images/ltc.gif align=left><b>Lieutenant Colonel</b><br><br>Legolas</td></tr>
<tr align=center><td colspan=2><img src=http://www.htmlforums.com/archive/index.php/modules/members/images/csm.bmp align=left><b>Command Sergeant Major</b><br><br>VACANT</td></tr>
<tr align=center><td><b>Squad 1</td><td><b>Squad 2</td></tr>
<tr align=center><td><img src=http://www.htmlforums.com/archive/index.php/modules/members/images/1stsgt.gif align=left><b>First Sergeant</b><br><br>VACANT</td><td><img src=modules/members/images/1stsgt.gif align=left><b>First Sergeant</b><br><br>VACANT</td></tr>
<tr align=center><td><img src=http://www.htmlforums.com/archive/index.php/modules/members/images/sfc.gif align=left><b>Sergeant First Class</b><br><br>VACANT</td><td><img src=modules/members/images/sfc.gif align=left><b>Sergeant First Class</b><br><br>VACANT</td></tr>
<tr align=center><td><img src=http://www.htmlforums.com/archive/index.php/modules/members/images/sergeant.bmp align=left><b>Sergeant</b><br><br>VACANT</td><td><img src=modules/members/images/sergeant.bmp align=left><b>Sergeant</b><br><br>VACANT</td></tr>
<tr align=center><td><img src=http://www.htmlforums.com/archive/index.php/modules/members/images/corporal.gif align=left><b>Corporal</b><br><br>VACANT</td><td><img src=modules/members/images/corporal.gif align=left><b>Corporal</b><br><br>VACANT</td></tr>
<tr align=center><td><img src=http://www.htmlforums.com/archive/index.php/modules/members/images/private.gif align=left><b>Private</b><br><br>VACANT</td><td><img src=modules/members/images/private.gif align=left><b>Private</b><br><br>VACANT</td></tr>Are you getting errors?
And you're missing a " on the echoI'm getting 潓牲ⱹ猠æµâ¨楦敬æ 敯湳ç§攠楸瑳⸮ at the top of my page, and it's not showing up in the modules page in the admin cpanel. If I view the page directly, I see the page but with that crap at the top, and it's just white, no theme colors or anything.where am I missing a "Here...
echo "<center><font class=\"content\">
Should be...
echo "<center><font class=\"content\">";
You missed the ";When I do that I get a buttload of ";" everywhere in the page.Originally posted by DA Master
echo "<center><font class=\"content\">";
You missed the ";
Have you copied the code above exactly?If I copy that line, I still get a "; in the top left corner of the screen.Sorry I understand now, should read this...
<?php
if (!eregi("modules.php", $_SERVER['PHP_SELF'])) {
die ("You can't access this file directly...");
}
require_once("mainfile.php");
$module_name = basename(dirname(__FILE__));
get_lang($module_name);
$pagetitle = "- "Members"";
$index = 1;
$ThemeSel = get_theme();
echo "<center><font class=\"content\">
<table cols=2 border=1 cellpadding=10>
<tr align=center><td colspan=2><img src=http://www.htmlforums.com/archive/index.php/modules/members/images/general.bmp align=left><b>General</b><br><br>Iceman</td></tr>
<tr align=center><td colspan=2><img src=http://www.htmlforums.com/archive/index.php/modules/members/images/colonel.bmp align=left><b>Colonel</b><br><br>Agent47</td></tr>
<tr align=center><td colspan=2><img src=http://www.htmlforums.com/archive/index.php/modules/members/images/ltc.gif align=left><b>Lieutenant Colonel</b><br><br>Legolas</td></tr>
<tr align=center><td colspan=2><img src=http://www.htmlforums.com/archive/index.php/modules/members/images/csm.bmp align=left><b>Command Sergeant Major</b><br><br>VACANT</td></tr>
<tr align=center><td><b>Squad 1</td><td><b>Squad 2</td></tr>
<tr align=center><td><img src=http://www.htmlforums.com/archive/index.php/modules/members/images/1stsgt.gif align=left><b>First Sergeant</b><br><br>VACANT</td><td><img src=modules/members/images/1stsgt.gif align=left><b>First Sergeant</b><br><br>VACANT</td></tr>
<tr align=center><td><img src=http://www.htmlforums.com/archive/index.php/modules/members/images/sfc.gif align=left><b>Sergeant First Class</b><br><br>VACANT</td><td><img src=modules/members/images/sfc.gif align=left><b>Sergeant First Class</b><br><br>VACANT</td></tr>
<tr align=center><td><img src=http://www.htmlforums.com/archive/index.php/modules/members/images/sergeant.bmp align=left><b>Sergeant</b><br><br>VACANT</td><td><img src=modules/members/images/sergeant.bmp align=left><b>Sergeant</b><br><br>VACANT</td></tr>
<tr align=center><td><img src=http://www.htmlforums.com/archive/index.php/modules/members/images/corporal.gif align=left><b>Corporal</b><br><br>VACANT</td><td><img src=modules/members/images/corporal.gif align=left><b>Corporal</b><br><br>VACANT</td></tr>
<tr align=center><td><img src=http://www.htmlforums.com/archive/index.php/modules/members/images/private.gif align=left><b>Private</b><br><br>VACANT</td><td><img src=modules/members/images/private.gif align=left><b>Private</b><br><br>VACANT</td></tr>"; ?>
Please wrap PHP code in vBCode PHP tags.I still can't get this crazy stuff. It still doesn't show up in the modules and doesn't format right. I'll just leave it as html.Do this then...
<?php
if (!eregi("modules.php", $_SERVER['PHP_SELF'])) {
die ("You can't access this file directly...");
}
require_once("mainfile.php");
$module_name = basename(dirname(__FILE__));
get_lang($module_name);
$pagetitle = "- "Members"";
$index = 1;
$ThemeSel = get_theme(); ?>
<font class="content" align="center">
<table cols=2 border=1 cellpadding=10>
<tr align=center><td colspan=2><img src=http://www.htmlforums.com/archive/index.php/modules/members/images/general.bmp align=left><b>General</b><br><br>Iceman</td></tr>
<tr align=center><td colspan=2><img src=http://www.htmlforums.com/archive/index.php/modules/members/images/colonel.bmp align=left><b>Colonel</b><br><br>Agent47</td></tr>
<tr align=center><td colspan=2><img src=http://www.htmlforums.com/archive/index.php/modules/members/images/ltc.gif align=left><b>Lieutenant Colonel</b><br><br>Legolas</td></tr>
<tr align=center><td colspan=2><img src=http://www.htmlforums.com/archive/index.php/modules/members/images/csm.bmp align=left><b>Command Sergeant Major</b><br><br>VACANT</td></tr>
<tr align=center><td><b>Squad 1</td><td><b>Squad 2</td></tr>
<tr align=center><td><img src=http://www.htmlforums.com/archive/index.php/modules/members/images/1stsgt.gif align=left><b>First Sergeant</b><br><br>VACANT</td><td><img src=modules/members/images/1stsgt.gif align=left><b>First Sergeant</b><br><br>VACANT</td></tr>
<tr align=center><td><img src=http://www.htmlforums.com/archive/index.php/modules/members/images/sfc.gif align=left><b>Sergeant First Class</b><br><br>VACANT</td><td><img src=modules/members/images/sfc.gif align=left><b>Sergeant First Class</b><br><br>VACANT</td></tr>
<tr align=center><td><img src=http://www.htmlforums.com/archive/index.php/modules/members/images/sergeant.bmp align=left><b>Sergeant</b><br><br>VACANT</td><td><img src=modules/members/images/sergeant.bmp align=left><b>Sergeant</b><br><br>VACANT</td></tr>
<tr align=center><td><img src=http://www.htmlforums.com/archive/index.php/modules/members/images/corporal.gif align=left><b>Corporal</b><br><br>VACANT</td><td><img src=modules/members/images/corporal.gif align=left><b>Corporal</b><br><br>VACANT</td></tr>
<tr align=center><td><img src=http://www.htmlforums.com/archive/index.php/modules/members/images/private.gif align=left><b>Private</b><br><br>VACANT</td><td><img src=modules/members/images/private.gif align=left><b>Private</b><br><br>VACANT</td></tr>
Also this line...
<center><font class="content">
Don't use the <center> tag, it's depricated, see my changed above...
<!-- m --><a class="postlink" href="http://www.w3schools.com/tags/tag_center.asp">http://www.w3schools.com/tags/tag_center.asp</a><!-- m -->
One last thing, don't use bitmaps in web pages. Use a .gif or .jpg (.jpg for pictures .gif for anything else generally).