Version: , by (Guest)
Developer Last Online: Jan 1970
Version: Unknown
Rating:
Released: 07-18-2000
Last Update: Never
Installs: 0
No support by the author.
In my forumdisplay.php I want to be able to display a separate link dependent on the forum they are reading at the time.
This is what I have:
if ($forumid==4) {
$ForumNews = "<IMG SRC=\"/icons/icon4.gif\" height=15 width=15 border=0> <A HREF=\"/rules/$forumid.html\"><B><smallfont Color=Red>Posting Guidelines for the Software For Sale Forum</B></A><BR><IMG SRC=\"/icons/icon4.gif\" height=15 width=15 border=0> <A HREF=\"http://www.xchangecity.com/\"><B>Exchange your used DVDs and CDs here!</smallfont></B></A><BR><IMG SRC=\"/icons/icon4.gif\" height=15 width=15 border=0> <B><largefont color=red><U>NO AUCTIONS! ALL SALE ITEMS MUST HAVE A POSTED PRICE</U></largefont></B>";
}
elseif ($forumid==5) {
$ForumNews = "<IMG SRC=\"/icons/icon4.gif\" height=15 width=15 border=0> <A HREF=\"/rules/$forumid.html\"><B><smallfont color=red>Posting Guidelines for the Hardware For Sale Forum</smallfont></B></A><BR><IMG SRC=\"/icons/icon4.gif\" height=15 width=15 border=0> <A HREF=\"http://www.wildin.com/addatrade.asp\"><B><largefont Color=Red Size="3"><U>NO AUCTIONS! ALL SALE ITEMS MUST HAVE A POSTED PRICE</U></largefont></B></A>";
} else {
$ForumNews = "";
}
This keeps giving me a parsing error.
Any ideas as to what would be causing the error?
Thanks,
Parker
Show Your Support
This modification may not be copied, reproduced or published elsewhere without author's permission.
Originally posted by Parker Clack
if ($forumid==4) {
$ForumNews = "<IMG SRC=\"/icons/icon4.gif\" height=15 width=15 border=0> <A HREF=\"/rules/$forumid.html\"><B><smallfont Color=Red>Posting Guidelines for the Software For Sale Forum</B></A><BR><IMG SRC=\"/icons/icon4.gif\" height=15 width=15 border=0> <A HREF=\"http://www.xchangecity.com/\"><B>Exchange your used DVDs and CDs here!</smallfont></B></A><BR><IMG SRC=\"/icons/icon4.gif\" height=15 width=15 border=0> <B><largefont color=red><U>NO AUCTIONS! ALL SALE ITEMS MUST HAVE A POSTED PRICE</U></largefont></B>";
}
elseif ($forumid==5) {
$ForumNews = "<IMG SRC=\"/icons/icon4.gif\" height=15 width=15 border=0> <A HREF=\"/rules/$forumid.html\"><B><smallfont color=red>Posting Guidelines for the Hardware For Sale Forum</smallfont></B></A><BR><IMG SRC=\"/icons/icon4.gif\" height=15 width=15 border=0> <A HREF=\"http://www.wildin.com/addatrade.asp\"><B><largefont Color=Red Size="3"><U>NO AUCTIONS! ALL SALE ITEMS MUST HAVE A POSTED PRICE</U></largefont></B></A>";
} else {
$ForumNews = "";
}
I have added some '\' before the '"'s. You forget them some times. Try the following code. If it doesn?t work, I give you an alternative way to display different links.
Code:
if ($forumid==4) {
$ForumNews = "<IMG SRC=\"/icons/icon4.gif\" height=15
width=15 border=0>??<A HREF=\"/rules/
$forumid.html\"><B><FONT SIZE="1" FACE="verdana,arial,helvetica" Color=Red>Posting Guidelines
for the Software For Sale Forum</B></A><BR><IMG
SRC=\"/icons/icon4.gif\" height=15 width=15
border=0>??<A HREF=\"http://www.xchangecity.com/
\"><B>Exchange your used DVDs and CDs here!
</font></B></A><BR><IMG SRC=\"/icons/icon4.gif\"
height=15 width=15 border=0>??<B><b><FONT face="Arial, Helvetica" color ="#003399" size="3"
color=red><U>NO AUCTIONS! ALL SALE ITEMS MUST HAVE A POSTED
PRICE</U></b></font></B>";
}
elseif ($forumid==5) {
$ForumNews = "<IMG SRC=\"/icons/icon4.gif\" height=15
width=15 border=0>??<A HREF=\"/rules/
$forumid.html\"><B><FONT SIZE="1" FACE="verdana,arial,helvetica" color=red>Posting Guidelines
for the Hardware For Sale Forum</font></B></A><BR><IMG
SRC=\"/icons/icon4.gif\" height=15 width=15
border=0>??<A
HREF=\"http://www.wildin.com/addatrade.asp\"><B><b><FONT face="Arial, Helvetica" color ="#003399" size="3"
Color=Red Size=\"3\"><U>NO AUCTIONS! ALL SALE ITEMS MUST
HAVE A POSTED PRICE</U></b></font></B></A>";
} else {
$ForumNews = "";
}