MyBB Community Forums

Full Version: Can't use special characters with integrated login...
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I'm using the MyBB login system for my site, following this tutorial. The problem is, I'm having to escape characters like quotes, and I can't use certain symbols (like "?", "%", "&" and so on).

This is the page with the error: http://www.ww-c.netii.net/mwss/
And this is the forum directory: http://www.ww-c.netii.net/forum/

Note: the forum is currently closed, but opening it has no effect.

This is the line that's causing the problems:
print "\t\t\t\t\t\t\t<li>\n\t\t\t\t\t\t\t\t<a href=\"/mwss/download/get/?user=".$tNameEsc."&file=".$tFileEsc.
"&type=".$dType."\"title=\"Creator: ".$dName."\nType: ".$dType."\">".$dFile."</a>\n\t\t\t\t\t\t\t</li>\n";
Can't help myself but to save time for anyone who wants to help this is the error message:
Quote:Parse error: syntax error, unexpected '?' in /home/a6550792/public_html/mwss/template.php on line 206
Umm... I seem to have got it to work, by writing it as literal HTML code.
?>
							<li>
								<a href="/mwss/download/get/?user=<? print $tNameEsc; ?>&file=<? print $tFileEsc; ?>&type=<? print $dType; ?>" title="Creator: <? print $dName; ?>
Type: <? print $dType; ?>"><? print $dFile; ?></a>
							</li>
<?

Although, I still have to write quotes in my PHP functions as \\\" as opposed to \". Also, new lines and tabs have to be written as \\n and \\t instead of \n and \t. Is there any reason for this?