PHP

= Basics =

= Code Snipets= $sql = "SELECT * FROM MasterDB WHERE sr=$sr"; $results = mysqli_query($link, $sql);
 * Redirect to another page if query is empty:

if (!$results) { die('Invalid query: ' . mysqli_error($link)); }

if (!$result = mysqli_fetch_array($results )){ header('Location: index.php', TRUE, 303); exit; } else { header('Location: index2.php', TRUE, 303); exit; }