'); // if something goes wrong then let the calling process know function carry_on($strError) { echo($strError); exit(0); } // turn off errors error_reporting(E_ERROR); // connect to the mothership (which will be localhost) $servername = 'nto.webpreview.org.uk'; $username = 'newtyneo_user'; $password = 'oBF&}V+TcZuF'; // if we cannot connect to the server, exit with error $connection = mysqli_connect($servername, $username, $password); if (!$connection) carry_on('Unable to connect to server'); // if we cannot connect to the database, exit with error $database = mysqli_select_db($connection, 'newtyneo_db1') or carry_on('Unable to connect to database'); $strSearch = $_POST['search']; if ($strSearch != '') { $strSearches = explode(' ', $strSearch); $strSearch = ""; for ($intTemp = 0; $intTemp < count($strSearches); $intTemp++) { $strSearch .= " AND tblConcert.cnFTE LIKE '%" . str_replace("'", "", $strSearches[$intTemp]) . "%'"; } $strSearch = " WHERE " . substr($strSearch, 5); } $strSort = $_POST['sort']; switch ($strSort) { case "cnConductor": case "cnVenue": $strSort = "tblConcert." . $strSort . ", tblConcert.cnDate DESC"; break; default: $strSort = "cnDate DESC"; } $strSQL = "SELECT tblConcert.* FROM tblConcert" . $strSearch . " ORDER BY " . $strSort; $result = mysqli_query($connection, $strSQL); if(!$result) carry_on('Could not execute "' . $strSQL . '" with error: ' . mysqli_error()); ?>
New Tyneside Orchestra

NEXT CONCERT
Saturday, 18th November 2017
St Nicholas Cathedral
Newcastle upon Tyne at 7:30pm

Concert Archive
Search:  

Date Conductor Venue Soloist
  :
NTO on Twitter    NTO on Facebook