Fixed 2 SQL Injection Vulnerabilities

Formatting has been tided up a little. Furthermore, 2 MySQL statements have been converted to prepared statements to help prevent an SQL injection attack in the tickets/view/index.php file.