87dave87 Posted November 22, 2006 Share Posted November 22, 2006 [code]<?include($_SERVER['DOCUMENT_ROOT'] . '/includes/head.php'); include($_SERVER['DOCUMENT_ROOT'] . '/includes/dbconnect.php'); $search_query = "select emulator, version, os, platform, details from windows_atari2600 where emulator LIKE '%".mysql_real_escape_string($_POST["emusearch"])."%' OR platform LIKE '%".mysql_real_escape_string($_POST["emusearch"])."%' order by platform asc, emulator asc"; if (empty($_POST['emusearch'])) { echo "<meta http-equiv='refresh' content='0; URL=/noresults.php'>"; exit(); }else { $search = mysql_query($search_query); $num_rows = mysql_num_rows($search); if($num_rows < 1) { echo "<meta http-equiv='refresh' content='0; URL=/noresults.php'>"; exit(); } }?> [/code]Do I need to use an else statement after the ' if($num_rows < 1) ' in the else call for if (empty($_POST['emusearch'])) Link to comment https://forums.phpfreaks.com/topic/28112-using-else-after-second-if/ Share on other sites More sharing options...
kenrbnsn Posted November 22, 2006 Share Posted November 22, 2006 No. Are you having a problem with this code?Ken Link to comment https://forums.phpfreaks.com/topic/28112-using-else-after-second-if/#findComment-128576 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.