[ create a new paste ] login | about

Link: http://codepad.org/YDD25GPW    [ raw code | output | fork ]

PHP, pasted on Dec 30:
<?php
function view_games()
{
		global $ir,$t,$userid, $db, $maxg;

		$q=$db->query("SELECT t.*, u.username FROM tchance t left join users u on u.userid = t.userID WHERE t.active = 1 ORDER BY t.logID ASC");

		echo "<a href='5050.php?add=1'>Add Game</a>

	Table of users awaiting a challenge

		<table class='table' width=50%><tr><th>Game ID</th><th>User</th><th>Amount</th><th>Challenge</th><th>Cancel</th></tr>";
		if($db->num_rows($q) < 1){echo "<tr><td colspan=5>There are currenly no challenges</td></tr>";}
		while($r=$db->fetch_row($q))
	{
		echo "<tr><td>{$r['logID']}</td><td><a href="viewuser.php?u={$r[">{$r['username']}</a> [{$r['userID']}]</td><td>{$r['amount']}</td><td><a href="5050.php?chal={$r[">Challenge</a></td><td>";}
		if($ir['userid']==$r['userID'])
		{
			echo "<a href="5050.php?cancel={$r[">Cancel</a>";}             
			echo "</td></tr>";
		}
		echo "</table>";
		}
		}
}
?>


Output:
1
2

Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' on line 16


Create a new paste based on this one


Comments: